weavejester / medley

A lightweight library of useful Clojure functions
Eclipse Public License 1.0
870 stars 67 forks source link

Function request: index-by #31

Closed martinklepsch closed 5 years ago

martinklepsch commented 5 years ago

I end up needing this frequently and would love to see it supported by medley. The semantics are a little ambiguous when the key appears twice in a collection (throw or last-wins) but either implementation would be a nice addition to medley :)

https://github.com/metosin/potpuri/blob/23aaa7a8c248cec346b2ea4753ef5b43f57abfb6/src/potpuri/core.cljc#L356-L363

weavejester commented 5 years ago

This looks to be the same as #28, though I think I prefer index-by as a name.

martinklepsch commented 5 years ago

Whoops, sorry for the dupe, searched issues but not pull requests 😅

I'll close this one and we can move on with #28.