cdf
The cumulative probability of the largest support point not exceeding x; zero below the support.
A single forward pass. The walk previously here advanced the iterator TWICE per pass, so it examined the brackets (x0,x1), (x2,x3), ... and never (x1,x2), (x3,x4), ...: arguments in a skipped bracket fell through to whichever point was consumed last, and a support with an odd number of points ran the iterator off the end and threw NoSuchElementException on an ordinary lookup. The early returns for the ends are no longer needed — an empty accumulator gives 0 below the support, and the last point's cumulative probability is 1 at or above its top.