[Haskell-cafe] Strange subtract operator behavior - and lazy
gale at sefer.org
Sun Oct 21 08:32:20 EDT 2007
Yitzchak Gale wrote:
>> 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
>> data LazyInteger = LazyInteger Bool Nat
>> or whatever.
Luke Palmer wrote:
> data LazyInteger = IntDiff Nat Nat
> The only value which would diverge when
> compared to a constant would be infinity - infinity.
Hmm. But then you could have integers that are
divergent and non-infinite. What do we gain by
doing it this way?
More information about the Haskell-Cafe