Lecture 6 - Slide 23 : 40
An example of for-each and function objects

An sample use of for-each() to find out if a list is sorted

Initial discussions of possible solutions to this simple problem

A possible use of for-each to solve this problem.
Following the advice: Solve the problem with a more appropriate algorithm.
Possible definitions of the type greater and its base class.