Skip to content

Instantly share code, notes, and snippets.

@mochow13
Last active September 18, 2018 16:32
Show Gist options
  • Save mochow13/a6314d44610898a3aedab1d9f9e18cda to your computer and use it in GitHub Desktop.
Save mochow13/a6314d44610898a3aedab1d9f9e18cda to your computer and use it in GitHub Desktop.
std::vector<int> fibs(10,1);
std::adjacent_difference(begin(fibs),end(fibs)-1,begin(fibs)+1,std::plus<>{});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment