simple-enumeration

Finite or countably infinite sequences of values, supporting efficient indexing and random sampling.


Keywords
data, library, Propose Tags , Data.Enumeration, Data.Enumeration.Invertible, announcement blog post
License
BSD-3-Clause
Install
cabal install simple-enumeration

Documentation

Lightweight, efficiently indexable enumerations

This package defines a type of enumerations, along with combinators for building and manipulating them. An enumeration is a finite or countably infinite sequence of values, represented as a function from an index to a value. Hence it is possible to work with even very large finite sets. Enumerations also naturally support (uniform) random sampling.

Note the goal of this package is not to enumerate values of Haskell types; there already exist many other packages to do that. Rather, the goal is simply to provide an abstract framework for working with enumerations of any values at all.

See the documentation for examples; see the announcement blog post for additional examples and discussion.