Skip to content

Instantly share code, notes, and snippets.

@bernerbrau
bernerbrau / Monads.md
Last active August 15, 2017 19:30 — forked from anonymous/Monads.md
On Monads

Monad

A type T is a subtype of type M[X] iff:

  1. There exists a function unit of type X → M[X]
  2. There exists a function bind of type (M[X], X → R) → R
  3. For all x:X and f:X→R : bind(unit(x),f) ≡ f(x)
Notes

The natural inclination is to ask, "What are the semantics here?" but it turns out that the semantics depend wholly on the