Tag types

First Class Functions and Functional Programming

Functions can take other functions as arguments. Consider: fun compose (f, n, x) = if n = 0 then x else f(compose(f, n-1, x)) This calls...

Polymorphic Types and Equality Types

The type ''a represents an equality type: It means anything that can be compared with the equality operator. Not everything can be...

Functions and Type Inference

If you use patterns to access records or function arguments, you usually do not need to specify their types. They will be inferred from...

Type Synonyms

type aname = t aname becomes an alias for type t. Useful for giving meaningful names: type date = int*int*int Think of it like typedef in C++.