On Jan 29, 2010, at 5:14 PM, Roger Pack wrote:

> Suggestion:
> 
> Allow map/etc al to accept a single argument, and convert it implicitly to proc.
> 
> collection.map(:symbol)
> 
> This reads more easily.
> 
> Another option would be to add map_by(arg) and collect_by(arg)
> 
> which would actually be more preferable, as least for me.
> 
> Thoughts?

First, I agree with this change request. ++

Second, might I expand on it a bit more? I'd prefer to see the symbol version of map, etc. be changed to have the same calling semantics as Object#send. That is, have the methods take a variable number of arguments, with the second and subsequent arguments applied to the proc defined by the first. If you are willing to consider this extension, might I also suggest names such as map_send() and each_send()? For example:

>> ary = [1, 2, 3, 4, 5]
>> ary.map_send(:*, 2)
=> [2, 4, 6, 8, 10]

Cheers,