
21 Oct
2007
21 Oct
'07
2:49 a.m.
On 10/19/07, Yitzchak Gale
So why not make the laziness available also for cases where "1 - 2 == 0" does _not_ do the right thing?
data LazyInteger = IntZero | IntSum Bool Integer LazyInteger
or
data LazyInteger = LazyInteger Bool Nat
I think data LazyInteger = IntDiff Nat Nat would admit implementation of most of the nice properties of this implementation. Comparison operators could short circuit when one of the two naturals is zero. The only value which would diverge when compared to a constant would be infinity - infinity. Luke