Re: [Haskell-cafe] Monads and Functions sequence and sequence_

2010-10-30 Thread Roman Cheplyaka
* Mark Spezzano [2010-10-30 15:37:30+1030] > Can somebody please explain exactly how the monad functions "sequence" > and "sequence_" are meant to work? The others in this thread have already explained how these functions work, so I'll just give an example how they are used. Consider the followi

Re: [Haskell-cafe] Monads and Functions sequence and sequence_

2010-10-29 Thread Gregory Crosswhite
The expression sequence [a,b,c,...] is roughly equivalent to do r_a <- a r_b <- b r_c <- c ... return [r_a,r_b,r_c,...] The expression sequence_ [a,b,c,...] is roughly equivalent to do a b c ...

[Haskell-cafe] Monads and Functions sequence and sequence_

2010-10-29 Thread Mark Spezzano
Hi, Can somebody please explain exactly how the monad functions "sequence" and "sequence_" are meant to work? I have almost every Haskell textbook, but there's surprisingly little information in them about the two functions. From what I can gather, "sequence" and "sequence_" behave differently