#include #include #include #include #include #include #include #include #include #ifdef __cplusplus #include #include #include #include #include #include #include #endif #define COINFLIP() (rand() % 2) int main(int argc, char const *argv[]) { std::function countdown; countdown = [&countdown](int x) { if (x <= 0) { std::cout << "done\n"; return; } std::cout << x << '\n'; countdown(x - 1); }; countdown(10); return 0; }