count-0.0.1: Bijective mappings between values and possibly infinite prefixes of [0..]

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Count

Synopsis

Documentation

class Countable a where Source

Class and instances for producing Counters by type.

Methods

counter :: Counter a Source

toPos :: Countable a => a -> Integer Source

Overloaded cToPos.

fromPos :: Countable a => Integer -> a Source

Overloaded cFromPos.

count :: Countable a => a -> Maybe Integer Source

Overloaded cCount. Doesn't attempt to reduce the dummy value given.

allValues :: Countable a => [a] Source

Overloaded allValuesFor.