Last active
November 23, 2016 09:00
-
-
Save picanumber/e6e8b2fd82c87dc4bace02840ebb0f9e 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 f4 = [](auto a, auto b, auto c) { return c * b * a; }; | |
std::cout << curry(f4, 2, 1)(1) << std::endl; | |
auto ccfs = compose(f1, f2, curry(f4, 2, 1)); | |
std::cout << ccfs(1) << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment