Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::unit_witness< Functor, T > Struct Template Referenceexport

unit_witness<Functor, T>: Generic Kleisli unit witness. Lifts a value into the Kleisli extension named by Functor::template Shape<T>. More...

Detailed Description

template<typename Functor, typename T>
struct dedekind::category::unit_witness< Functor, T >

unit_witness<Functor, T>: Generic Kleisli unit witness. Lifts a value into the Kleisli extension named by Functor::template Shape<T>.

kleisli__The_Maybe_Action_Engine

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.

Template Parameters
FunctorA regular type carrying a nested Shape alias; canonical examples are maybe_functor (monad-only) and tuple_functor (Frobenius) from :functor.
T The value type.

The documentation for this struct was generated from the following file: