> (Aw, don't put it that way :-)
> 
> Have a look at the "ToDo" file in the distribution
> -- you'll see:
> 
>   * discourage use of symbol variables (e.g. $/,
> etc.) in manual
>   * discourage use of Perlish features by giving
> warnings.
> 
> So a new global of that kind probably isn't on the
> horizon.  I was
> playing around with extending objects during
> iteration, so that you
> could do:
> 
>   ary.map {|e| puts "We're at iteration
> #{e.iteration}"}
> 
> or something -- but I haven't come up with a way to
> do it that
> fits more than a subset of cases.  For one thing,
> you can't
> extend Fixnums, so anything based on that method
> won't work if
> your array contains those.  Also, the syntax of
> block parameters
> makes it hard:  if you have
> 
>   ary.map {|e,f,g| ... }
> 
> I'm not sure there's a way to determine which object
> got the
> #iteration method added to it....
> 
> 
> David
> 
> -- 
> David Alan Black
> home: dblack / candle.superlink.net
> work: blackdav / shu.edu
> Web:  http://pirate.shu.edu/~blackdav
> 

OK... globals = evil... more importantly cryptic code
= evil.  I can appreciate that.  And I think getting
rid of the extraneous _with_index methods would clean
things up a bit.

But I'm still determined to come up with a solution ;)

Can we arbitrarily add a parameter to the block? 
Something like:

ary.collect {|a,b,c,:iteration| ...}

The idea is if there is an argument beginning with
':', assign the iteration value/object for this
particular block to that.

That way, block are still easily nestable.  As for
your other comment... is it really necessary to have
an index associated with each argument?  Shouldn't
they all be synchronized?

I'm not familiar yet with actual implementation
details, so I'm not sure how this would work... I'm
just throwing out UI ideas for now.  

Jason