From: William Morgan Date: 2005-07-08T23:48:26+09:00 Subject: Re: accessing index inside map Excerpts from William Morgan's mail of 8 Jul 2005 (EDT): > Excerpts from Michael Campbell's mail of 8 Jul 2005 (EDT): > > On 7/8/05, David A. Black wrote: > > > I'd still like to see #man_with_index added to Enumerable. > > > > "index" implies an ordering, which maps by definition don't have. > > Shouldn't that be something along the lines of "#map_with_key"? > > "Map" here means "collect", not "Hash". Whoops, I may have read too much into your reply. Sorry. Anyways, as Robert Klemme points out, the index is often useful in counting, so I'd be favor of putting map_with_index in Enumerable. -- William