Implementing Generators with Macros in C++
Enthusiasts have written C++ generators based on do notation, which is also built on macros. The implementation is open source and licensed under the MIT license. // Without do notation, auto result = ::bind(mx, [&](auto&& x) { return ::bind(my, [&](auto&& y) { return make_value(x + y); }); }); // With do notation, auto result = DO( LET x IS(mx); LET y IS(my); return make_value(x […]
