|
|
|
|
|
by fusiongyro
4766 days ago
|
|
I suspect Joe is referring to the fact that when you desugar "do notation" you arrive at basically a lot of function composition: do x <- f
y <- g
return $ h (x + y)
becomes f >>= (\x -> g >>= (\y -> return (h (x+y))))
I don't think Joe does a lot of Haskell, so I'm not sure his vision of monads matches up with a Haskeller's though. For me, the fact that monadic do-notation desugars this way is less meaningful than that a monad is anything that supplies the functions bind and return with the necessary types. After all, not every block introduced by "do" is an SSA-friendly looking series of assignments leading up to some function call. |
|