Perl Hacks shows a similar trick with Want's howmany(). Basically you wrap another iterator around the first and kick the original iterator sufficient times. (Hm, seems kinda monadic.)
I think that's sort of what you were asking, but now I'm not quite sure.
In reply to Re: best way to implement multiple foreach iterator variables?
by chromatic
in thread best way to implement multiple foreach iterator variables?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |