numbers-2009.8.9: Various number types

Data.Number.Natural

Description

Lazy natural numbers. Addition and multiplication recurses over the first argument, i.e., 1 + n is the way to write the constant time successor function.

Note that (+) and (*) are not commutative for lazy natural numbers when considering bottom.

Synopsis

Documentation

infinity :: NaturalSource

The infinite natural number.