3 ms·
That's not 100% correct. Something that implements a "monad interface" (e.g. has pure, map and flatMap methods) doesn't compulsorily have to be a monad. A mon
by still_grokking 8y ago
That's not 100% correct.
Something that implements a "monad interface" (e.g. has pure, map and flatMap methods) doesn't compulsorily have to be a monad.
A monad has to obey the monad laws to be one.
Scala's Future is not a monad per se:
https://stackoverflow.com/questions/27454798/is-future-in-scala-a-monad https://stackoverflow.com/questions/27454798/is-future-in-sc...
- smadge 8y agoI was assuming a pure core of Scala, its true I should have been more explicit. Arbitrary side effects and IO make it impossible to reason algebraically/equationally about your programs.