|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
unit_witness<Functor, T>: Generic Kleisli unit witness. Lifts a value into the Kleisli extension named by Functor::template Shape<T>.
More...
unit_witness<Functor, T>: Generic Kleisli unit witness. Lifts a value into the Kleisli extension named by Functor::template Shape<T>.
Maybe is a monad, not a comonad — counit on std::nullopt has no honest answer. This block defines only the monadic surface for Maybe<T> (bind, unit_witness). The Frobenius monad (a monad and a comonad on one functor, μ and δ related by the Frobenius law) is std::tuple<T> below; that's where counit / extend / IsCoKleisliTriple / IsFrobenius witnesses live.
| Functor | A regular type carrying a nested Shape alias; canonical examples are maybe_functor (monad-only) and tuple_functor (Frobenius) from :functor. |
| T | The value type. |