# Extracting a maximum from zipped lists

I have code that zips 3 lists, finds a maximum and extracts part of the max tuple. Isn't there a shorter way to do this in F#?

let Triplets = List.zip3 A B C
let T1 (x, _, _) = x
let T2 (_, x, _) = x
let T3 (_, _, x) = x
let Best = List.maxBy T3 Triplets

• You could obviously combine T1 and T2 to T12 (x, y, _) = (x, y). The rest of your solution looks pretty idiomatic to me. However, the need of such "zip3-max-extract" operation chain could be a sign for a design flaw somewhere else in your logic. – conrad Mar 1 '15 at 15:40
One way to simplify this would be to use nested pairs (('a * 'b) * 'c) instead of a triple ('a * 'b * 'c). That way, you can use fst and snd to get to the parts that you want:
let triplets = List.zip (List.zip A B) C