std::optional<int> foo();
And then
std::optional<int> bar(){
int x = co_await foo(); int y = co_await foo(); return x+y;
No messy chaining or lambda pyramid of doom.
I'm surprised that the monadic ops and C++ co_await are not being aligned in the standard yet
std::optional<int> foo();
And then
std::optional<int> bar(){
}No messy chaining or lambda pyramid of doom.
I'm surprised that the monadic ops and C++ co_await are not being aligned in the standard yet