Re: Some new iterator methods?
[prev]
[thread]
[next]
[Date index for 2004/10/26]
On Tue, Oct 26, 2004 at 01:13:41PM -0400, John Day wrote:
> wish I had a couple of new iterator methods, particularly:
> ->previous
> ->last
>
These shouldn't be too difficult to implement. There are some issues due
to the possibility of mapping methods expanding into multiple objects,
but if you implement each of these in terms of next() (or factor out the
part of next that selects the current location from the part that gets
the item there) it should reduce most breakage. (If someone really wants
to iterate through lists that may change in size then they can send the
patch to allow it!)
Tony