Paper record

W2037984920

The essence of functional programming

Philip L. Wadler

Year
1992
Venue
ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL)
References
7
Cited by
791

Details and counts from OpenAlex.

Abstract

This paper explores the use monads to structure functional programs. No prior knowledge of monads or category theory is required. Monads increase the ease with which programs may be modified. They can mimic the effect of impure features such as exceptions, state, and continuations; and also provide effects not easily achieved with such features. The types of a program reflect which effects occur. The first section is an extended example of the use of monads. A simple interpreter is modified to support various extra features: error messages, state, output, and non-deterministic choice. The second section describes the relation between monads and the continuation-passing style. The third section sketches how monads are used in a compiler for Haskell that is written in Haskell.