Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joboccara
Created February 18, 2017 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joboccara/f0685f417bcbe0671c9c1bcd93eca7f6 to your computer and use it in GitHub Desktop.
Save joboccara/f0685f417bcbe0671c9c1bcd93eca7f6 to your computer and use it in GitHub Desktop.
std::vector<CashFlow> flows = ...
auto it = std::find_if(flows.begin(), flows.end(), isPositive);
std::cout << "Made " it->getValue() << "$, at last!\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment