What does distinct-by return in case of a collision? (keys (group-by...))
(map first (vals (group-by ...))) (map other-fn (vals (group-by ...))) You're still better off w/ group-by, and manipulating the resulting map appropriately. Sean On Feb 22, 1:15 pm, Michał Marczyk <michal.marc...@gmail.com> wrote: > The Haskell approach is to have two functions, nub and nubBy, which > perform the task of distinct and the task of distinct with a > user-provided keyfn, respectively. I'd love to see a distinct-by in > core or contrib. (Mostly for completeness, it's easy enough to > write...) > > As for the extra set argument, I'd rather leave it out. Use a > composition of distinct-by and filter. > > Sincerely, > Michał -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en