Article,

Generalising monads to arrows.

.
Science of Computer Programming, 37 (1-3): 67-111 (2000)
DOI: 10.1016/S0167-6423(99)00023-4

Abstract

Monads have become very popular for structuring functional programs since Wadler introduced their use in 1990. In particular, libraries of combinators are often based on a monadic type. Such libraries share (in part) a common interface, from which numerous benefits flow, such as the possibility to write generic code which works together with any library. But, several interesting and useful libraries are fundamentally incompatible with the monadic interface. In this paper I propose a generalisation of monads, which I call arrows, with significantly wider applicability. The paper shows how many of the techniques of monadic programming generalise to the new setting, and gives examples to show that the greater generality is useful. In particular, three non-monadic libraries for efficient parsing, building graphical user interfaces, and programming active web pages fit naturally into the new framework.

Tags

Users

  • @dblp
  • @gdmcbain

Comments and Reviews