12 lines
185 B
Text
12 lines
185 B
Text
|
|
open monad io
|
||
|
|
|
||
|
|
loop [] = return ()
|
||
|
|
loop (x::xs) = do
|
||
|
|
putStr (show x)
|
||
|
|
putStr f
|
||
|
|
loop xs
|
||
|
|
where f | x % 5 == 0 = "\r\n"
|
||
|
|
| else = ", "
|
||
|
|
|
||
|
|
_ = loop [1..10] ::: IO
|