Hostname: page-component-89b8bd64d-7zcd7 Total loading time: 0 Render date: 2026-05-09T02:13:15.516Z Has data issue: false hasContentIssue false

Comprehending monads

Published online by Cambridge University Press:  04 March 2009

Philip Wadler
Affiliation:
Department of Computing Science, University of Glasgow, G12 8QQ, Scotland.waldler@dcs.glasgow.ac.uk.

Abstract

Category theorists invented monads in the 1960's to express concisely certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to express concisely certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbitrary monad, and how the resulting programming feature can express concisely in a pure functional language some programs that manipulate state, handle exceptions, parse text, or invoke continuations. A new solution to the old problem of destructive array update is also presented. No knowledge of category theory is assumed.

Information

Type
Research Article
Copyright
Copyright © Cambridge University Press 1992

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable