Hi Michael,
although I never used it myself, lists seem strange in the way that when combining list monads, then all the values go through the chain one by one -- x will be 1 first, then 2, then 3 and so on.. Try it out, to see. (I think the result is then also a list of all combinations of results.)
On 8 August 2010 16:21, michael rice <nowgate@yahoo.com> wrote:
getLine >>= \x -> -- x is a string at this point
[1..] >>= \x -> -- x is WHAT at this point?
Num n => n
A number from the list.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe