In Fantasy Land, types are specified by an object containing a catamorphic
method cata
. cata
has an arity matching the number of constructor functions
belonging to each type. Each argument to cata
is either:
- a value
- a function with an arity matching the number of arguments to the constructor
function.
- Each function argument to
cata
must return a value of the same type as
- Each function argument to