//: C05:Binder3.cpp // From Thinking in C++, 2nd Edition // Available at http://www.BruceEckel.com // (c) Bruce Eckel 2000 // Copyright notice in Copyright.txt // Binders aren't limited to producing predicates #include "Generators.h" #include #include #include #include using namespace std; int main() { ostream_iterator out(cout, " "); vector v(15); generate(v.begin(), v.end(), URandGen(20)); copy(v.begin(), v.end(), out); cout << endl; transform(v.begin(), v.end(), v.begin(), bind2nd(multiplies(), 10)); copy(v.begin(), v.end(), out); cout << endl; } ///:~