exenumversion

Build efficient enumerations for datatypes. Inspired by Feat for Haskell.

The exenum library offers constructors to build enumerations for
datatypes, that is, functions from (arbitrarily large) integers to
values. Such enumerations are typically used for unit testing. The
library is efficient: the n-th element of an enumeration is returned
without having computed the (n-1) previous elements. Complexity is in
log(n), except for some pathological datatypes. See the homepage for
details: http://exenum.forge.ocamlcore.org/
Inspired by Feat: Functional Enumeration of Algebraic Types, by
Duregard, Jansson, Wang, Chalmers University.

As an example, consider the following datatype:
type term = Var of string | App of term * term | Lambda of string * term