[Haskell-cafe] Natural Numbers: Best implementation?

Sebastian Fischer sebf at informatik.uni-kiel.de
Fri Mar 13 04:11:44 EDT 2009

Hi Mark,

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...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090313/f32e708f/attachment.htm

More information about the Haskell-Cafe mailing list