A function f has type s t . Hopefully, f terminates on all inputs. An application e 1 e 2 is legal only if e 1 is of type s t and e 2 is of type t . Functions cannot be compared, nor can any compound value that contains functions. Atomic values can be compared, so can any compound value that is built out of comparable values.
Function definitions are recursive.
It can work on m any types of lists. Functions that take other functions as arguments are called higher order functions. The first f can be applied to only a single argument. This is also called partial evaluation . Such types are denoted by ''a .