In order to prove that every Monad is an Applicative we cannot simply use pure to implement (<*>) because pure is a requirement of Applicative, see exercise 3.2:
|
2. `Monad` extends `Applicative`, because every `Monad` is |
|
also an `Applicative`. Proof this by implementing |
|
`(<*>)` in terms of `(>>=)` and `pure`. |
We could use pure if we also implemented pure in terms of (>>=) and join without (<*>).
In order to prove that every
Monadis anApplicativewe cannot simply usepureto implement(<*>)becausepureis a requirement ofApplicative, see exercise 3.2:idris2-tutorial/src/Tutorial/Functor.md
Lines 1238 to 1240 in b3264e0
We could use
pureif we also implementedpurein terms of(>>=)andjoinwithout(<*>).