Benchmark obsession?

Excellent. Never heard of it.

Henry

···

On 22/06/2012, at 7:58 PM, Lars Haugseth <ruby-talk@larshaugseth.com> wrote:

c.flat_map {|run| run[:list]}

Dude. If I knew that one I'd forgotten it. Thanks!

···

On Jun 22, 2012 3:59 AM, "Lars Haugseth" <ruby-talk@larshaugseth.com> wrote:

c.flat_map {|run| run[:list]}

Enumerable also has

thingies.group_by(&:key)
thingies.group_by(&:key).map {|o,y| [o,y.length]}

Kind regards

robert

···

On Thu, Jun 21, 2012 at 6:28 AM, Avdi Grimm <groups@inbox.avdi.org> wrote:

On Wed, Jun 20, 2012 at 9:07 PM, Sam Duncan <sduncan@wetafx.co.nz> wrote:

Is that basically the same thing wrapped in another method so that counter
and o are yielded to a block?

Yes, and it's part of
Enumerable: Module: Enumerable (Ruby 1.9.3)

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/