So we already have that capability built-in (without introducing a new function). Clojure also already has max-by and min-by—max-key, min-key though, perhaps, with a slightly different interface that what you might have expected.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was going to say the same! Here's what that looks like:
So we already have that capability built-in (without introducing a new function). Clojure also already has
max-by
andmin-by
—max-key, min-key though, perhaps, with a slightly different interface that what you might have expected.