Tuesday, August 31, 2004 7:17 PM
pgolde
First() and Last() on OrderedSet
I add two new parameterless methods to OrderedSet (and OrderedBag): First() and Last() which return the first (smallest) and last (largest) items in the set.
I also added these to the View class that's returned by Range(), RangeFrom(), and RangeTo(). This permits nice idioms like:
set.RangeFrom(”M”).First()
to get the smallest item greater than or equal to “M”.