Reputation: 35762
Given the following list in Clojure:
(def pairs '[(2,1),(3,2),(2,4)])
I want to sort these in descending order based on the second item in each pair.
ie I want them to sort into:
[(2,4),(3,2),(2,1)]
My question is: How do you sort pairs in a list based on a nested value?
Upvotes: 0
Views: 47