Created
January 9, 2017 19:34
-
-
Save deque-blog/55200baeb10fe44c3e6b1ad59124b8a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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