Skip to content

Instantly share code, notes, and snippets.

@loliGothicK
Created June 10, 2018 06:51
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 loliGothicK/18dd366e142d705cc023d8c8947d489c to your computer and use it in GitHub Desktop.
Save loliGothicK/18dd366e142d705cc023d8c8947d489c to your computer and use it in GitHub Desktop.
#include <iostream>
int main() {
[](auto f){
return [=](auto x) {
return [=](auto ...y) {
return f(x(x), y...);
};
}([=](auto x) {
return [=](auto ...y) {
return f(x(x), y...);
};
});
}([]([[maybe_unused]]auto f, auto a, auto ...x) {
std::cout << a << std::endl;
if constexpr(sizeof...(x)) {
f(x...);
}
})(1,2,3,4,5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment