
26 Jul
2010
26 Jul
'10
11:46 a.m.
From: Kevin Jardine
As a Haskell neophyte, one of the things I find confusing is the way that the usual list functions (map, fold, ++, etc.) often cannot be used directly with monadic lists (m [a] or [m a]) but seem to require special purpose functions like ap, mapM etc.
I suspect that things are not quite as difficult as they appear, however, but cannot find any tutorials on monadic list manipulation.
It's not really a tutorial, but have you read the Typeclassopedia, http://haskell.org/sitewiki/images/8/85/TMR-Issue13.pdf ? I found it very helpful to get a good understanding of functors, applicatives, and monads, after which it became much simpler to get good usage from Control.Monad and Control.Applicative. John