James Edward Gray II <james / grayproductions.net> wrote:
> 
> The Set class has this feature and I even like the name:
> 
> irb(main):001:0> require "set"
> => true
> irb(main):002:0> langs = Set.new([:perl, :python, :ruby])
> => #<Set: {:perl, :python, :ruby}>
> irb(main):003:0> langs.classify { |m| m.to_s[0, 1] }
> => {"p"=>#<Set: {:perl, :python}>, "r"=>#<Set: {:ruby}>}

That *is* nice - wonder if there'd be any issues with moving it into
Enumerable.

martin