Function Type

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 AB, 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:

    Uses are always much broader than functions, and usually far less contentious. The word function carries overtones of purpose and propriety, of concern with why something was developed rather than with how it has actually been found useful. The function of automobiles is to transport people and objects, but they are used for a variety of other purposes—as homes, offices, bedrooms, henhouses, jetties, breakwaters, even offensive weapons.
    Frank Smith (b. 1928)

    This immediate dependence of language upon nature, this conversion of an outward phenomenon into a type of somewhat in human life, never loses its power to affect us. It is this which gives that piquancy to the conversation of a strong-natured farmer or backwoodsman, which all men relish.
    Ralph Waldo Emerson (1803–1882)