3 ms·
It sounds like you are literally offering to give a monad tutorial, which is brave because, notoriously, so many people have attempted that, usually using metap
by theoh 8y ago
It sounds like you are literally offering to give a monad tutorial, which is brave because, notoriously, so many people have attempted that, usually using metaphors.
Wadler's misleadingly titled earlier paper "The Essence of Functional Programming" is actually more elementary than the one linked to, and gets to the core of the issue:
"2.1 What is a monad?
For our purposes, a monad is a triple (M,unitM,bindM) consisting of a type constructor
M and a pair of polymorphic functions.
unitM :: a -> M a
bindM :: M a -> (a -> M b) -> M b"
If you can read this code and understand what a type constructor is, then that is the most general, least metaphorical way to understand monads in FP.
- KirinDave 8y agoI think maybe I am, but I have some tricks up my sleeve.