module SlowQ -- export all (for testing) where data Q a = Q [a] deriving Show -- for development ---------------------------- empty :: Q a add :: a -> Q a -> Q a remove :: Q a -> Q a front :: Q a -> a isEmpty :: Q a -> Bool ---------------------------- empty = Q [] add x (Q xs) = Q (xs++[x]) remove (Q (x:xs)) = Q xs front (Q (x:xs)) = x isEmpty (Q []) = True