RosettaCodeData/Task/Loops-Continue/Ela/loops-continue-2.ela

12 lines
185 B
Text
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
open monad io
2013-04-10 21:29:02 -07:00
2015-11-18 06:14:39 +00:00
loop [] = return ()
loop (x::xs) = do
putStr (show x)
putStr f
loop xs
where f | x % 5 == 0 = "\r\n"
| else = ", "
2013-04-10 21:29:02 -07:00
2015-11-18 06:14:39 +00:00
_ = loop [1..10] ::: IO