peano-inf-0.6.1: Lazy Peano numbers including observable infinity value.

Number.Peano.Inf.Functions

Synopsis

minimum :: [Nat] -> NatSource

Minimum of the list elements. Works also for empty lists.

maximum :: [Nat] -> NatSource

Maximum of the list elements. Works also for empty lists.

length :: [a] -> NatSource

Lazyness properties of Nat makes it ideal for lazy list length computation. Examples:

Nat

length [1..] > 100

length undefined >= 0

length (undefined: undefined) >= 1