; Department of Mathematics; Concordia University; f(x)-- f(0); x;. Then if g(x) = f(x + 1), P[g(x)] = P[x; 2
SVM HeaderParse 0.2
AUTHOR ADDR
; Montral, Qubec, Canada; + 2x + 1] =
SVM HeaderParse 0.1
ABSTRACT
This paper deals with the problem of a program that is essentially the same over any of several types but which, in the older imperative languages must be rewritten for each separate type. For example, a sort routine may be written with essentially the same code except for the types for integers, booleans, and strings. It is clearly desirable to have a method of writing a piece of code that can accept the specific type as an argument. Milner developed his ideas in terms of type assignment to lambda-terms. It is based on a result due originally to Curry (Curry 1969) and Hindley (Hindley 1969) known as the principal type-scheme theorem, which says that (assuming that the typing assumptions are sufficiently wellbehaved) every term has a principal type-scheme, which is a type-scheme such that every other type-scheme which can be proved for the given term is obtained by a substitution of types for type variables. This use of type schemes allows a kind of generality over all types, which is known as polymorphism.