in reply to Re: Array iterator factory
in thread Array iterator factory
If I took a list, I'd have to make and store a copy of its contents. It would be expensive, and it would not see subsequent changes to the original array. I wanted a lightweight iterator tied to a user-modifiable array.
Caution: Contents may have been coded under pressure.
The user can create an anonymous array and slap an iterator on it, if he so desires: array_iterator(@{[1..10]}). That makes it obvious that this iterator can't give you the free lunch that for (1..10) does.
Caution: Contents may have been coded under pressure.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Array iterator factory (&)
by tye (Sage) on Mar 17, 2005 at 03:25 UTC | |
by Roy Johnson (Monsignor) on Mar 17, 2005 at 04:55 UTC | |
by tye (Sage) on Mar 17, 2005 at 16:53 UTC |
In Section
Cool Uses for Perl