Helper predicates and accessors.

Function to find the most recent local extrema.