3 ms·
Which means you are now forced to write the boilerplate pure = return (<*>) = liftM2 ($) In Scala, you get it for free for any monad.
by Chattered 11y ago
Which 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.