Re: [Haskell-cafe] Natural Numbers: Best implementation?

14 Mar
2009
14 Mar
'09
5:32 p.m.
On Fri, 13 Mar 2009, Mark Spezzano wrote:
1. Don’t bother. Just use Integer.
2. Use the type
data Natural = Zero | Succ !Natural
3. Use the following definition taken from the Gentle Introduction to Haskell 98
newtype Natural = MakeNatural Integer
This option looks like non-negative package.
5913
Age (days ago)
5913
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henning Thielemann