UP | HOME

"Applicative Monad" exercise

So, Learn You a Haskell makes this comment, in the chapter on Monads ("A Fistful of Monads"), shortly before introducing the banana function:

We couldn't have achieved this by just using Maybe as an applicative. If you try it, you'll get stuck, because applicative functors don't allow for the applicative values to interact with each other very much.

But I did it. See my GitHub repository at:

(As of the date of this web page, see below.)

The first file is definitions; the second, application/use/test of said definitions.

I didn't actually even use MMaybe as an applicative, I don't think. Hmmm.

Created: 2023-08-06 Sun 14:23

Emacs 27.2 (Org mode 9.4.4)

Validate