Reputation: 8073
I have a nested list that looks like this:
let i = [(6, 0.2), (4, 0.9), (12, 0.1)]
I'm interested in finding the element that has the smallest second element:
(12, 0.1)
I was trying to use minimum, but obviously that doesn't work. How can I find the minimum of a nested list?
minimum (\(x, y) -> y) lst
Upvotes: 2
Views: 327