Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active January 9, 2017 19:18
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 deque-blog/7a0804cb75e5a596af6d3adb0f76f1b6 to your computer and use it in GitHub Desktop.
Save deque-blog/7a0804cb75e5a596af6d3adb0f76f1b6 to your computer and use it in GitHub Desktop.
template<typename Range, typename... Steps>
auto fold(Range const& rng, Steps... steps)
{
return std::accumulate(
rng.begin(), rng.end(),
std::make_tuple(steps()...),
par_steps(steps...));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment