3 ms·
> Sure, but that's not a feature of Monads themselves, but a feature of the excellent generic programming support in Haskell This easiness comes from the exist
by 6gvONxR4sf7o 6y ago
> Sure, but that's not a feature of Monads themselves, but a feature of the excellent generic programming support in Haskell
This easiness comes from the existence of fmap, which is defined for any functor (monads are all functors). To instance it and get haskell's lovely syntax, any given "container" has to define its own fmap implementation. So it is a feature of monads. If you implement a monad in another language, you're still going to be defining fmap (or an equivalent), which lets you use this.