[Haskell-cafe] map applications

Brian McQueen mcqueenorama at gmail.com
Fri Aug 19 22:47:14 EDT 2005


I have a simple list like this:

qlist = ["ll", "kkkkkkk", "ddddd"]

Why is it OK to do this:

qwrap [] = putStrLn ":"
qwrap (a:as) = do 
                putStrLn a
                qwrap as

qwap qlist

but not this:

map putStrLn qlist

What is going on in the map function?

McQueen


More information about the Haskell-Cafe mailing list