# File lib/util.rb, line 12
def
uniq_by
;
inject
({}) {
|
h
,
o
|
h
[
yield
(
o
)] =
o
;
h
}.
values
end