2 ms·
It's the same. A coroutine that does ``` lazy<int> f(int i) { if (i == 0) co_return i; co_return co_await f(i-1); } ``` should be tail-optimized.
by mgaunard 4y ago
It's the same.
A coroutine that does
```
lazy<int> f(int i) {
if (i == 0)
co_return i;
co_return co_await f(i-1);
}
```
should be tail-optimized.