01 02 03 04 05 06 01 02 03 04 05 06 07 08 09 10 11 12 13 14 ← →
module Main where
Again, we can do all this at once. The operator \
defines an unnamed
function.
main ∷ IO () main = putStr $ foldl (\ s t → s ++ t ++ "\n") [] ["hello", "there", "world"]
hello there world