The expressive power of functional programming can be improved by identifying and exploiting the characteristics that distinguish data types from function types.
Data types support generic functions for equality, mapping, folding, etc.
Such generic functions require case analysis, or pattern-matching, where the branches may have incompatible types, e.g. products or sums. This is handled in the constructor calculus where specialisation of program extensions is governed by constructors for data types. Typing of generic functions employs polymorphism over functors in a functorial type system . The expressive power is greatly increased by allowing the functors to be polymorphic in the number of arguments they take, i.e. in their arities . The resulting system can define and type the fundamental examples above.