Introduce functions maxComparator() and minComparator() to cut down on the number of closures created.
Tests for map(), reverse(), and intersperse().