On 8/2/07, David Roundy <[EMAIL PROTECTED]> wrote:
> This would be a very nice type to have (natural numbers), but is a tricky
> type to work with.  Subtraction, for instance, wouldn't be possible as a
> complete function...

There is a subtraction-like operation for naturals, where a - b = 0 if
a <= b. This is analogous to the way that "drop n xs" returns [] if n
>= length xs, but using it in a Num instance would probably violate
too many assumptions.

The desire to support naturals was the motivation for including
semirings in my Num refactoring thought-experiment.

<http://article.gmane.org/gmane.comp.lang.haskell.cafe/15141/>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to