
And this is because the implementation of IO is *specifically* crafted to guarantee this ordering. It is not a property of monads in general, or do syntax in general.
On 15 April 2015 11:31:38 pm AEST, Ryan Yates
In your example a and b will be ordered as you would expect.
On Wed, Apr 15, 2015 at 9:26 AM, Jon Schneider
wrote: Perhaps I need to be more specific.
main = do a <- getLine b <- getLine
Can we say "a" absolutely always receives the first line of input and if so what makes this the case rather than "b" receiving it ? Or do things need to be slightly more complicated to achieve this ?
Sorry it's just the engineer in me. I think once I've got this clear I'll be happy to move on.
Jon
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
------------------------------------------------------------------------
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe