[Haskell-cafe] Strange subtract operator behavior - and lazy naturals

John Meacham john at repetae.net
Thu Oct 18 19:31:00 EDT 2007


On Thu, Oct 18, 2007 at 01:58:14PM +0200, Yitzchak Gale wrote:
> - Zero really means 0, not "0 or negative".

Actually, zero does mean zero. There is no such thing as negative
numbers in the naturals so it doesn't make sense to say '0 or negative'.

Subtraction is necessarily defined differently of course. As in, a
natural number type was actually my goal as it is the "natural" choice
for a lot of operations (hah! pun!), it wasn't a concession. 

I found the paper that originally inspired me to write this class:
http://citeseer.ist.psu.edu/45669.html

it is a good read.

        John


-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Haskell-Cafe mailing list