On Wed, Nov 23, 2005 at 05:24:11PM -0200, Flavio S. Glock wrote:
: Ah, ok - but I believe that say() is slurpy, which means the list must
: be instantiated first.

It's * instantiated, but not ** instantiated, so the iterators buried
in the .specs of the list aren't forced to evaluate yet.  And ranges
are iterator objects.  The hidden iterators of a * list are evaluated
when the values are requested from the slurpy array.  So

    say 1...;

ought to produce lots of output without ever running out of memory.

(In reality, iterators are allowed to produce their values in batches
for efficiency, so there's a slight possibility that an iterator
could exhaust memory while producing the next batch.)

Larry

Reply via email to