In computer science, a function type (also arrow type or exponential) is the type of a variable or parameter to which a function has or can be assigned or the result type of a higher-order function returning a function.
A function type depends on the type of the parameters and the result type of the function (it, or more accurately the unapplied type constructor · → ·, is a higher-kinded type). In theoretical settings and languages where functions are defined in curried form, such as the simply typed lambda calculus, a function type depends on exactly two types, the domain A and the range B. Here a function type is often denoted A → B, following mathematical convention, or BA, based on the fact that there exist exactly BA (exponentially many) set-theoretic functions mapping A to B.
Read more about Function Type: Programming Languages, Denotational Semantics
Famous quotes containing the words function and/or type:
“As a medium of exchange,... worrying regulates intimacy, and it is often an appropriate response to ordinary demands that begin to feel excessive. But from a modernized Freudian view, worryingas a reflex response to demandnever puts the self or the objects of its interest into question, and that is precisely its function in psychic life. It domesticates self-doubt.”
—Adam Phillips, British child psychoanalyst. Worrying and Its Discontents, in On Kissing, Tickling, and Being Bored, p. 58, Harvard University Press (1993)
“This type of man who is devoted to the study of wisdom is always most unlucky in everything, and particularly when it comes to procreating children; I imagine this is because Nature wants to ensure that the evils of wisdom shall not spread further throughout mankind.”
—Desiderius Erasmus (c. 14661536)