First-class Function - Type Theory

Type Theory

In type theory, the type of functions accepting values of type A and returning values of type B may be written as AB or BA. In the Curry-Howard correspondence, function types are related to logical implication; lambda abstraction corresponds to discharging hypothetical assumptions and function application corresponds to the modus ponens inference rule. Besides the usual case of programming functions, type theory also uses first-class functions to model associative arrays and similar data structures.

In category-theoretical accounts of programming, the availability of first-class functions corresponds to the closed category assumption. For instance, the simply typed lambda calculus corresponds to the internal language of cartesian closed categories.

Read more about this topic:  First-class Function

Famous quotes containing the words type and/or theory:

    But the mother’s yearning, that completest type of the life in another life which is the essence of real human love, feels the presence of the cherished child even in the debased, degraded man.
    George Eliot [Mary Ann (or Marian)

    ... liberal intellectuals ... tend to have a classical theory of politics, in which the state has a monopoly of power; hoping that those in positions of authority may prove to be enlightened men, wielding power justly, they are natural, if cautious, allies of the “establishment.”
    Susan Sontag (b. 1933)