Finding the highest first element of a second element of a tuple and returning the first element of the found tuple.
(defn test [cards]
(->>
(apply max (map #(get % 1) cards))
(.indexOf (map #(get % 1) cards) )
(get cards)
(first)
)
)
(test [[1 14] [3 24] [2 12] [4 24])
=> 3
This works perfectly, but is there a more idiomatic way to do this?