This module is inspired by the paper
Functional Programming with Overloading and Higher-Order Polymorphism,
Mark P Jones (http://web.cecs.pdx.edu/~mpj/)
Advanced School of Functional Programming, 1995.

An example from The Craft of Functional Programming, Simon
Thompson (http://www.cs.kent.ac.uk/people/staff/sjt/),
Addison-Wesley 1999: "Given an arbitrary tree, transform it to a
tree of integers in which the original elements are replaced by
natural numbers, starting from 0. The same element has to be
replaced by the same number at every occurrence, and when we meet
an as-yet-unvisited element we have to find a 'new' number to match
it with:"