Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
auto to_nice_result = [](auto min, auto avg, auto big) {
return batch_result{ min, avg.m_value, big.m_count };
};
auto typed = apply(to_nice_result, fold_result);
std::cout
<< "Result summary:\n"
<< " - Minimum: " << typed.m_minimum << "\n"
<< " - Average: " << typed.m_average << "\n"
<< " - Variations: " << typed.m_variation_count << "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment