3 ms·
I like this comment because it helps illustrate the subtlety of monads as they apply to programming. I think mode C# programmers would likely think of ';' and
by ch 11y ago
I like this comment because it helps illustrate the subtlety of monads as they apply to programming.
I think mode C# programmers would likely think of ';' and '??' as syntax, and who is thinking of 'no-op' as anything!?
But if you were in haskell this would not be syntax, but just functions on an instance of the Monad type class.
Haskell could easily add some sugar to make these constructs syntax as well, but it would just be sugar -- and that is where the power, and confusion I think arises when most programmers think about monads.