Math 2.0

Computer science Type theory Concept

Monad in functional programming

Builds on Monad

Summary

In functional programming, a monad is a type constructor MM with two operations, ๐—‹๐–พ๐—๐—Ž๐—‹๐—‡:Aโ†’Mโ€‰A\mathsf{return} : A \to M\, A and ๐–ป๐—‚๐—‡๐–ฝ:Mโ€‰Aโ†’(Aโ†’Mโ€‰B)โ†’Mโ€‰B\mathsf{bind} : M\, A \to (A \to M\, B) \to M\, B, that satisfy three laws. A value of type Mโ€‰AM\, A is read as a computation that produces a value of type AA, possibly with an effect. Typical effects are failure, state, input and output, and nondeterminism. Eugenio Moggi used monads of category theory to structure the semantics of effects. Philip Wadler brought them into programming, where they are central to Haskell. The laws are the laws of a Kleisli triple, an equivalent form of a monad on the category of types and functions.

Reading path

To understand this page from the ground up, read these 2 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Monad concept
  2. Monad in functional programming concept

Further reading

  1. Web https://en.wikipedia.org/wiki/Monad_(functional_programming)
About this page
Tag83FVPGE7Q5
URIm2://83FVPGE7Q5
Kindconcept
WritingW0 stub
MSC68N18, 18C15
UsesMonad
Same as
Changed3 November 2026

Markdown ยท JSON ยท Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Definitions