Personal tools

Combinator

From HaskellWiki

Revision as of 14:13, 20 September 2012 by Byorgey (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

There are two distinct uses of the word "combinator" in common usage.

The first is a narrow, technical meaning, namely:

A function or definition with no free variables.

A "function with no free variables" is a pure lambda-expression that refers only to its arguments, like

 \a -> a
 \a -> \b -> a
 \f -> \a -> \b -> f b a

and so on. The study of such things is called combinatory logic. They are certainly used in Haskell -- the examples above are id, const, and flip respectively. Many of the functions involved in the Applicative instance for ((->) e) also fall into this category. But such examples are fairly limited.

The second meaning of "combinator" is a more informal sense referring to the combinator pattern, a style of organizing libraries centered around the idea of combining things. This is the meaning of "combinator" which is more frequently encountered in the Haskell community. Usually there is some type T, some functions for constructing "primitive" values of type T, and some "combinators" which can combine values of type T in various ways to build up more complex values of type T.


Question: On which syllable do you put the stress when saying "combinator"?

I say COM-bin-ay-tur, since it comes from "combine". -- User:AndrewBromage

See also: