4 ms·
Didn't downvote, just FYI: Haskell's Applicative is a superclass of Monad now.
by koloron 11y ago
Didn't downvote, just FYI: Haskell's Applicative is a superclass of Monad now.
- Chattered 11y agoWhich means you are now forced to write the boilerplate pure = return (<*>) = liftM2 ($) In Scala, you get it for free for any monad.
- koloron 11y agoSince GHC-7.10, the minimal complete definition for a Monad instance has been (>>=) (bind) only. So you can simply move the old definition for "return" into the Applicative instance as "pure" and you're good.