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 get the idea of separating pure and impure
2010/7/26 Kevin Jardine kevinjard...@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
2010/7/26 Kevin Jardine kevinjard...@gmail.com:
I suspect that things are not quite as difficult as they appear,
however, but cannot find any tutorials on monadic list manipulation.
I'd suggest that you get as many pure values as possible from impure
world, apply to them easy to use pure
From: Kevin Jardine kevinjard...@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
Greg Buchholz [EMAIL PROTECTED] wrote:
Here's a question for the Haskell community that I've been
wrestling with lately. When we say lists are monads what does that
mean? I can see one of two things. First the slightly superficial...
A.) Lists can be made members of the
Here's a question for the Haskell community that I've been wrestling
with lately. When we say lists are monads what does that mean? I can
see one of two things. First the slightly superficial...
A.) Lists can be made members of the Monads class, and you can define
a couple of
Interpretation A is correct. The type (constructor) of Lists gives a
monad together with return x = [x] and x = f = concatMap f x.
Interpretation B doesn't really work, because the monad interface does
not give one the ability to write head or tail. You basically have
return (which gets you from