You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add an example of asynchronous composition with libfn #393
README used to claim that libfn is a natural fit for asynchronous composition, naming coroutines and senders/receivers. That claim was removed during the 0.1 documentation pass because nothing in the repository backed it — no example, no reference page. The property underneath it is real, though, and worth demonstrating rather than asserting.
What is true and demonstrable today:
an operation is a value: fn::and_then(f) is a description of a step, not its execution, and it runs when a monad is piped into it;
such a step is constexpr, copyable, and can be stored, passed around and applied later — including in a constant expression;
so a framework can hold the steps of a computation and apply them as results arrive, with a typed error channel and no hidden control flow.
An example that shows this would earn the claim back, and README could then state it with a pointer.
Scope. Any asynchronous model will do. Coroutines and senders/receivers are not required — plain Boost.Asio would demonstrate the point perfectly well. One example is enough to start.
The design question to settle first. Every example under examples/ is currently free of third-party dependencies, is built in C++20, C++23 and C++26 modes, and is registered as a ctest target that runs across the full CI matrix — Linux gcc/clang, macOS, MSVC, plus the nix, bazel, vcpkg and conan package-test lanes. An example needing Boost would be the first external dependency in that set, so it should be gated on the dependency being found rather than added unconditionally; otherwise every lane and every packaging route acquires a Boost requirement it does not have today.
Activity
Bronek commentedon Aug 2, 2026
How about making this example Linux-only, and use this new-fangled thing called uring 🤔
This way no dependencies, just example tied to the most popular platform.