module Tins::UniqBy

def uniq_by(&block)

def uniq_by(&block)
  block ||= lambda { |x| x }
  inject({}) { |h, e| h[ block.call(e) ] ||= e; h }.values
end