Skip to content

Instantly share code, notes, and snippets.

@picanumber
Last active November 23, 2016 09:00
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 picanumber/e6e8b2fd82c87dc4bace02840ebb0f9e to your computer and use it in GitHub Desktop.
Save picanumber/e6e8b2fd82c87dc4bace02840ebb0f9e to your computer and use it in GitHub Desktop.
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