The one in the numbers package is not quite as clever as John&#39;s; it&#39;s the naïve version of lazy naturals.<br><br><div><span class="gmail_quote">On 10/17/07, <b class="gmail_sendername">Stuart Cook</b> &lt;<a href="mailto:scook0@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

scook0@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 10/17/07, John Meacham &lt;<a href="mailto:john@repetae.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

john@repetae.net</a>&gt; wrote:<br>&gt; if anyone is interested, Although I bet this has been implemented a<br>&gt; hundred times over, I have attached my lazy naturals module below just<br>&gt; for larks. It is quite efficient as such things go and very lazy. for
<br>&gt; instance (genericLength xs &gt; 5) will only evaluate up to the 5th element<br>&gt; of the list before returning a result. and ((1 `div` 0) &gt; 17) is true,<br>&gt; not bottom.<br><br>&gt; If anyone wants me to clean this up and package it as a real module, I
<br>&gt; would be happy to do so.<br><br>It looks like there&#39;s already a lazy-natural type in the &quot;numbers&quot;<br>package on Hackage, but not having used it I have no idea what it&#39;s<br>like.<br><br><a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numbers-2007.9.25" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/numbers-2007.9.25</a><br><a href="http://tinyurl.com/2pmthz" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://tinyurl.com/2pmthz</a>
<br><br><br>Stuart<br>_______________________________________________<br>
Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.haskell.org/mailman/listinfo/haskell-cafe</a>
<br></blockquote></div><br>