以下递归lambda调用如何结束/终止?
#includeauto terminal = [](auto term) // <---------+ { // | return [=] (auto func) // | ??? { // | return terminal(func(term)); // >---------+ }; }; auto main() -> int { auto hello =[](auto s){ fprintf(s,"Hello\n"); return s; }; auto world =[](auto s){ fprintf(s,"World\n"); return s; }; terminal(stdout) (hello) (world) ; return 0; }
我在这里错过了什么?
Running code