[Haskell-cafe] reordering pure bindings in monads

2008-05-29 Thread Tim Newsham
Intuitively it seems like the applicative expression: (++) $ getLine * getLine should represent the same thing as the more traditional liftM2 expressions: do { x - getLine; y - getLine; return ((++) x y) } but it seems to me that you cant directly manipulate the first into the second.

Re: [Haskell-cafe] reordering pure bindings in monads

2008-05-29 Thread Dan Doel
On Thursday 29 May 2008, Tim Newsham wrote: Intuitively it seems like the applicative expression: (++) $ getLine * getLine should represent the same thing as the more traditional liftM2 expressions: do { x - getLine; y - getLine; return ((++) x y) } but it seems to me that you cant