SML Types Primitive types include int , real , bool , and string . Each of these has an associated set of literal constants and operators, e.g., bool has the constants true and false , and the operators not , andalso , and orelse . Tuple types are cartesian products of other types.
List types represent a sequence of values of a single particular type.
Function types represent functions taking a fixed argument type and returning a fixed result type. For example, functions taking an integer and returning a string are have type int string . SML has no symbols, so we use strings instead. We can think of this as an abbreviation for an infinite family of types, obtained by consistently substituting any type for . In addition to identifying the variant that matched, the pattern can contain variables that are bound to the corresponding elements of the value record.