Skip to content

Instantly share code, notes, and snippets.

@cjameshuff
Created November 21, 2012 17:39
Show Gist options
  • Save cjameshuff/4126361 to your computer and use it in GitHub Desktop.
Save cjameshuff/4126361 to your computer and use it in GitHub Desktop.
int main(int argc, const char * argv[])
{
auto op = [](int t) -> int {return 2*t;};
vector<int> data {1, 2, 3, 4, 5};
for(auto & x : data)
printf("%d\n", op(x));
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment