←back to thread

A list is a monad

(alexyorke.github.io)
153 points polygot | 1 comments | | HN request time: 0.238s | source
Show context
danieltanfh95 ◴[] No.44450440[source]
The obsession with trying to explain a monad ultimately stems from conflicting explanations and the inability to differentiate between a mathematical monad and monads implemented in software.

Monads in software are just a standard API for any given type. That’s it. Theres no magic here. Just implement the standard and you have a monad.

It grinds my gears seeing monad tutorial after tutorial using the wrong metaphors or misleading explanations

replies(2): >>44450870 #>>44450979 #
1. lmm ◴[] No.44450870[source]
Associativity is important, and not something that can be expressed in the API in most languages.