[Haskell-cafe] Lists and monads

John Lato jwlato at gmail.com
Mon Jul 26 11:46:34 EDT 2010


> From: Kevin Jardine <kevinjardine at gmail.com>
>
> 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


More information about the Haskell-Cafe mailing list