Skip to content

Instantly share code, notes, and snippets.

@carlfish
carlfish / gist:6b9761670a131f821ad5
Last active February 3, 2018 23:21
Why understanding monads is important.

Either and Promises/Futures are useful and I’ll use them next time they’re appropriate. But outside Haskell does their monad-ness matter?

(All code below is written in some made-up Java-like syntax, and inevitably contains bugs/typos. I'm also saying "point/flatMap" instead of "return/bind" because that's my audience. Any correspondance with anything that either be programatically or mathematically useful is coincidental)

What is a monad? A refresher.

A monad is something that implements "point" and "flatMap" correctly.