[Haskell-cafe] What is <-

Markus Läll markus.l2ll at gmail.com
Sun Aug 8 10:38:04 EDT 2010


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 Sun, Aug 8, 2010 at 5:26 PM, Christopher Done
<chrisdone at googlemail.com>wrote:

> On 8 August 2010 16:21, michael rice <nowgate at 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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100808/e8168e56/attachment.html


More information about the Haskell-Cafe mailing list