Created
November 23, 2016 00:47
-
-
Save picanumber/adb3e6345d3a2b54cc5b70180de1e6dd to your computer and use it in GitHub Desktop.
This file contains 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
int main() | |
{ | |
auto f1 = [](auto a) { return 2 * a; }; | |
auto f2 = [](auto a) { return 3 * a; }; | |
auto f3 = [](auto a, auto b) { return b * a; }; | |
auto cfs = compose(f1, f2, f3); | |
std::cout << cfs(2, 3) << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment