I\'m trying to select the minimum element in a list based on the third value of its elements. But there seems to be a problem with my usage of higher-order functions in the