Hi --

On Wed, 29 Jul 2009, Robert Dober wrote:

> On Wed, Jul 29, 2009 at 2:31 PM, David A. Black<dblack / rubypal.com> wrote:
>>
>> I confess I don't see the point, but thanks for clarifying.
> It is cheating, bending Ruby to the needs of the problem. We even had
> a discussion if it should use each_cons or each_slice below the hood.
>
> But the point might be, that it might make sense to have things like
> map_cons or map_slice

In 1.9 you get: enumerable.each_cons(x).map ...  which has much the
same effect. I don't like the idea of map having a stealth each_cons
in it. Also, defining it for Enumerable won't affect arrays (at least
in MRI), because Array overries map.


David

-- 
David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com
Q: What's the best way to get a really solid knowledge of Ruby?
A: Come to our Ruby training in Edison, New Jersey, September 14-17!
    Instructors: David A. Black and Erik Kastner
    More info and registration: http://rubyurl.com/vmzN