opvasger / enumerable / Enumerable

This module documents a simple approach to enumeration.

"An enumeration is a complete, ordered listing of all the items in a collection."

Enumerable


type alias Enumerable value =
value -> value

A function that implements an enumeration over a type of value.

toList : Enumerable value -> value -> List value

Get a list of all distinct values enumerated. The values are ordered according to the enumeration, starting with the given value.