Combinator library
Encyclopedia
A combinator library is a software library which implements combinators
for a functional programming language; "the key idea is this: a combinator library offers functions (the combinators) that combine functions together to make bigger functions". These kinds of libraries are particularly useful for allowing domain-specific programming language
s to be easily embedded into a general purpose language by defining a few primitive functions for the given domain and turning over the task of expanding higher-level constructs to the general language. An example would be the monadic
Parsec parser http://www.haskell.org/haskellwiki/Parsec for Haskell
. The library approach allows the parsers to be first-class
citizens of the language.
Combinatory logic
Combinatory logic is a notation introduced by Moses Schönfinkel and Haskell Curry to eliminate the need for variables in mathematical logic. It has more recently been used in computer science as a theoretical model of computation and also as a basis for the design of functional programming...
for a functional programming language; "the key idea is this: a combinator library offers functions (the combinators) that combine functions together to make bigger functions". These kinds of libraries are particularly useful for allowing domain-specific programming language
Domain-specific programming language
In software development and domain engineering, a domain-specific language is a programming language or specification language dedicated to a particular problem domain, a particular problem representation technique, and/or a particular solution technique...
s to be easily embedded into a general purpose language by defining a few primitive functions for the given domain and turning over the task of expanding higher-level constructs to the general language. An example would be the monadic
Monads in functional programming
In functional programming, a monad is a programming structure that represents computations. Monads are a kind of abstract data type constructor that encapsulate program logic instead of data in the domain model...
Parsec parser http://www.haskell.org/haskellwiki/Parsec for Haskell
Haskell (programming language)
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...
. The library approach allows the parsers to be first-class
First-class object
In programming language design, a first-class citizen , in the context of a particular programming language, is an entity that can be constructed at run-time, passed as a parameter, returned from a subroutine, or assigned into a variable...
citizens of the language.