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

f on the value an optional holds, none where it holds none: the optional functor's action on an arrow. Its codomain is stated, so an arrow into optionals lifts to one into optionals of optionals, as a Kleisli extension needs, and is never collapsed by deduction. More...

Collaboration diagram for dedekind::category::MaybeMap< T, F >:

Public Types

using Domain = std::optional<T>
using Codomain

Public Member Functions

constexpr Codomain operator() (const Domain &m) const

Public Attributes

F f

Detailed Description

template<typename T, typename F>
requires std::invocable<const F&, const T&>
struct dedekind::category::MaybeMap< T, F >

f on the value an optional holds, none where it holds none: the optional functor's action on an arrow. Its codomain is stated, so an arrow into optionals lifts to one into optionals of optionals, as a Kleisli extension needs, and is never collapsed by deduction.

Template Parameters
Tthe element.
Fthe arrow.

Member Typedef Documentation

◆ Codomain

template<typename T, typename F>
using dedekind::category::MaybeMap< T, F >::Codomain
Initial value:
std::optional<
std::remove_cvref_t<std::invoke_result_t<const F&, const T&>>>

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