Date: 2015-01-14 08:41 am (UTC)
Um, no. f >=> g means execute f first, g next. That's what people normally want when they do IO. It is not commutative. Note I say execute, not evaluate. IO values can be evaluated in any order, but after they are evaluated, they are executed by the IO execution mechanism, which is totally separate from the Haskell evaluation mechanism. And the execution is done *in order*. That's why we need the IO monad in the first place.

f >=> (g >=> h) means do f first, then do the combined action (g >=> h).

If you are switching the execution order around you are not doing IO.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

July 2025

S M T W T F S
  12345
6789 1011 12
131415 1617 1819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 29th, 2025 02:59 pm
Powered by Dreamwidth Studios