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

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