[Haskell-cafe] Execution order in IO

Ryan Yates fryguybob at gmail.com
Wed Apr 15 13:31:38 UTC 2015


In your example a and b will be ordered as you would expect.

On Wed, Apr 15, 2015 at 9:26 AM, Jon Schneider <haskell at jschneider.net>
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 at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150415/fcaf923f/attachment.html>


More information about the Haskell-Cafe mailing list