maximumBy package:contiguous

The largest element of a structure with respect to the given comparison function.