From: Eric Hodel Date: 2005-07-12T08:26:48+09:00 Subject: Re: accessing index inside map On 11 Jul 2005, at 05:27, Jim Freeze wrote: > How about a more 'rails' like implementation: > > [1,2,3].map(:with_index) { |x,ix| ... } > [1,2,3].collect(:with_index) { |x,ix| ... } > [1,2,3].collect!(:with_index) { |x,ix| ... } > [1,2,3].each(:with_index) { |x,ix| ... } > [1,2,3].each { |x| ... } Ugh. My impression has always been that they couldn't make up their minds, or, didn't think hard enough about picking good names the first time around. -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04