open monad io xs = "SPAM"::xs takeit 0 _ = do return () takeit num (x::xs) = do putStrLn x takeit (num - 1) xs _ = takeit 10 xs ::: IO