Closed martinklepsch closed 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
This looks to be the same as #28, though I think I prefer index-by as a name.
index-by
Whoops, sorry for the dupe, searched issues but not pull requests 😅
I'll close this one and we can move on with #28.
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