## 24.3.3 Function Objects (cont.)

- Instantiate for each different divisor needed:

  >     list<int> a_list;
  >     . . .
  >     list<int>::iterator current = a_list.begin();
  >     DivisibleBy pred(*current); // Create the predicate
  >     ++current; // Advance to next element
  >     list<int>::iterator ele =
  >        find_if(current, a_list.end(), pred);
  >     if (ele != a_list.end()) // Found it

prev |top |next