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:

    Only that type of story deserves to be called moral that shows us that one has the power within oneself to act, out of the conviction that there is something better, even against one’s own inclination.
    Johann Wolfgang Von Goethe (1749–1832)

    Hygiene is the corruption of medicine by morality. It is impossible to find a hygienest who does not debase his theory of the healthful with a theory of the virtuous.... The true aim of medicine is not to make men virtuous; it is to safeguard and rescue them from the consequences of their vices.
    —H.L. (Henry Lewis)