4 ms·
Promises are not monads. neither are scala's future.
by merb 7y ago
Promises are not monads. neither are scala's future.
- zzo38computer 7y agoI don't use Promises much, but Generators is like monads (but not monads on a category of pure functions, like it is in Haskell; also, these "monads" in JavaScript are not pure monads); actually, two kind of monads: return x; return x -> return yield*x return yield x; yield x -> yield*x (at least, I think it is; I may have made a mistake)