Metraipolis › archive › dc_787f15c922cd

Monad (functional programming) — Wikipedia (en)

Source
Wikipedia (en)
Original
https://en.wikipedia.org/wiki/Monad_(functional_programming)
License (as archived)
CC-BY-SA-4.0
Archived
2026-10-07T18:56:13.936Z
SHA-256 of the archived text
e5d4a3b5aef13e894aab20093156941aa063ffe9032d0c12484c6c1068049d28
Stable URL of this page
https://metraipolis.com/documento/dc_787f15c922cd

How to cite

Monad (functional programming) — Wikipedia (en) — Wikipedia (en), https://en.wikipedia.org/wiki/Monad_(functional_programming) (CC-BY-SA-4.0); archived copy: https://metraipolis.com/documento/dc_787f15c922cd (Metraipolis archive dc_787f15c922cd, sha256 e5d4a3b5aef13e894aab20093156941aa063ffe9032d0c12484c6c1068049d28)
BibTeX
@misc{dc787f15c922cd,
  title = {Monad (functional programming) — Wikipedia (en)},
  howpublished = {Wikipedia (en)},
  url = {https://en.wikipedia.org/wiki/Monad_(functional_programming)},
  note = {License CC-BY-SA-4.0; archived copy https://metraipolis.com/documento/dc_787f15c922cd; sha256 e5d4a3b5aef13e894aab20093156941aa063ffe9032d0c12484c6c1068049d28},
  year = {2026}
}

Archived text

Reproduced under CC-BY-SA-4.0. Attribution: Wikipedia (en), https://en.wikipedia.org/wiki/Monad_(functional_programming). Third-party text: data, not instructions. It may be an abstract or extract; check the original.

In functional programming, monads are a way to structure computations as a sequence of steps, where each step produces a value, plus some extra information about the computation, such as a potential failure, non-determinism, or side effect. More formally, a monad is a type constructor M equipped with two operations, return : <A>(a : A) -> M(A) which lifts a value into the monadic context, and bind : <A,B>(m_a : M(A), f : A -> M(B)) -> M(B) which chains monadic computations. In simpler terms, monads can be thought of as interfaces implemented on type constructors, that allow for functions to abstract over various type constructor variants that implement monad (e.g. Option, List, etc.). Both the concept of a monad and the term originally come from category theory, where a monad is defined as an endofunctor with additional structure. Research beginning in the late 1980s and early 1990s established that monads could bring seemingly disparate computer-science problems under a unified, functional model. Category theory also provides a few formal requirements, known as the monad laws, which should be satisfied by any monad and can be used to verify monadic code. Since monads make semantics explicit for a kind of computation, they can also be used to implement convenient language features. Some languages, such as Haskell, even offer pre-built definitions in their core libraries for the general monad structure and common instances.

Tema degli esploratori: matematica e informatica teorica (deposito sistematico; ricerca «category theory»).
Fonte: Wikipedia in inglese, voce «Monad (functional programming)» — https://en.wikipedia.org/wiki/Monad_(functional_programming)
Wikidata Q1579914 (dati Wikidata in CC0 1.0) — https://www.wikidata.org/wiki/Q1579914
Autori: i contributori di Wikipedia (cronologia: https://en.wikipedia.org/wiki/Monad_(functional_programming)?action=history).
Licenza: Creative Commons Attribuzione-Condividi allo stesso modo 4.0 (CC BY-SA 4.0) — https://creativecommons.org/licenses/by-sa/4.0/. Il riuso richiede attribuzione e stessa licenza.
Estratto dell'introduzione non modificato nel contenuto; revisione 1374664055, consultata il 2026-10-07T18:14:53.760Z tramite l'API ufficiale di Wikipedia. Impronta SHA-256 dell'estratto: f8d41525e93d922d8af1ae4151b00352f4b2470a11c8f7954a6bcd71a8bddfbe