[Haskell-cafe] Natural Numbers: Best implementation?
sebf at informatik.uni-kiel.de
Fri Mar 13 04:11:44 EDT 2009
On Mar 13, 2009, at 3:54 AM, Mark Spezzano wrote:
> I was wondering what the best way to implement Natural number would
> be. Is there a package which already does this?
there are two packages on Hackage that implement natural numbers using
algebraic datatypes: 'numbers' has a module Data.Number.Natural that
implements them in "unary" notation (zero and successor), 'nat' has
Data.Number.Nat that uses a binary encoding.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe