Go backward to
Polymorphic Functions
Go up to
Top
Go forward to
Recursive Definitions
Parametric Types
Type definitions with similar structure:
type BoolPair = Bool x Bool
type IntPair = Int x Int
Use
parametric
definition:
type Pair[T] = T x T
type PairOfBool = Pair[Bool]
type PairOfInt = Pair[Int]
Type operators are
not
types:
type A[T] = T
->
T
type B =
forall
T. T
->
T
Different notions!
Author:
Wolfgang Schreiner
Last Modification: May 27, 1998