ElementType!Range[2] extrema(Range)(Range r) if (isInputRange!Range && !isInfinite!Range)
Returns an array of the minimum and maximum element in r. Performs < 3n/2 comparisons, unlike the naive < 2n.
r
< 3n/2
< 2n