[Haskell-cafe] Re: Shouldn't this loop indefinitely => take (last
[0..]) [0..]
Felipe Lessa
felipe.lessa at gmail.com
Sun Apr 6 10:30:20 EDT 2008
On Sun, Apr 6, 2008 at 11:12 AM, John Meacham <john at repetae.net> wrote:
> I implemented this efficient lazy natural class once upon a time. it
> even has things like lazy multiplication:
[...]
> instance Num Nat where
> Zero + y = y
> Sum x n1 + y = Sum x (y + n1)
> --x + Zero = x
> --Sum x n1 + Sum y n2 = Sum (x + y) (n1 + n2)
[...]
May I ask you why the last line above was commented out?
Thanks!
--
Felipe.
More information about the Haskell-Cafe
mailing list