Re:What does it mean for a monad to be strong?
by Sharlin on Monday August 21, 2023 @08:26PM
(#37217054)
You're right, there's no right-associativity actually involved, but the article probably used the term because the code kinda looks right-associative if you squint. The point is that the rightmost >>= is evaluated first, which lets the y lambda capture x. The article put the parens like this:
which to a non-Haskeller like me does make it look more right-associative than it actually is – and as the article showed, you can actually make it "left-associative" in the obvious way, which would indeed compile fine and be equivalent to the "right-associative" way if the y lambda didn't refer to x.
[ Parent
| on HN ]
There are no comments on this comment yet.