Hi Vimal,

> I was surprised to find out that the following piece of code:
>
> > length [1..] > 10
>
> isnt lazily evaluated!

The problem is that Int and Integer are both eager. It is possible to
write a lazy peano number based data type, but I'm not aware of anyone
who has - I have half the code (in joint work with Matt Naylor and
Greg Manning) but none of us have taken the time to finish it off
properly.

For details about why we should have lazy naturals read
http://citeseer.ist.psu.edu/45669.html - Colin Runciman, What About
the Natural Numbers (1989)

Thanks

Neil
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to