Closed dmg46664 closed 4 years ago
Ah. Never mind, I see it's just a matter of pulling the values and wrapping the outside with distinct
, which I just learnt about.
(distinct (select [ALL :key] col))
I guess if you wanted the entire map of each first distinct item that might be an interesting use case, but it's not mine. Closing.
I'm learning clojure so perhaps this is something that is not an intended use case of specter, and best left to core implementations. It would be useful for me if non-supported use cases were added to the cheat sheet, if for no other reason than for clarity 🙏
I know there is
pred
but this would need to be a stateful predicate I guess, which doesn't feel very idiomatic.