Introduction to OOP Chapter 20: The STL : next previous audio real text

Why do this?

Objects can take arguments computed at run-time, specialize functions in a way that simple functions cannot:

	class biggerThan {
		biggerThan (int x) : testValue(x) { }
		const int testValue;
		bool operator () (int val)
			{ return val > testValue; }

	list<int>::iterator firstBig =
		find_if (aList.begin(), aList.end(), biggerThan(12));

Intro OOP, Chapter 20, Slide 09

In functional languages, this kind of object is sometimes known as a curry.