Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::Unfold< S, Coalg > Struct Template Referenceexport

The anamorphism of a coalgebra as an arrow from the seeds: x >> unfold<S>(c) is unfold(x, c). More...

Collaboration diagram for dedekind::category::Unfold< S, Coalg >:

Public Types

using Domain = S
using Codomain = unfold_view<S, Coalg>

Public Member Functions

constexpr Codomain operator() (const S &seed) const
constexpr bool operator== (const Unfold &) const =default

Public Attributes

Coalg coalg

Detailed Description

template<std::regular S, std::semiregular Coalg>
requires requires(const S& s, const Coalg& c) { unfold(s, c); }
struct dedekind::category::Unfold< S, Coalg >

The anamorphism of a coalgebra as an arrow from the seeds: x >> unfold<S>(c) is unfold(x, c).

Template Parameters
Sthe state.
Coalgthe coalgebra.

Member Function Documentation

◆ operator()()

template<std::regular S, std::semiregular Coalg>
Codomain dedekind::category::Unfold< S, Coalg >::operator() ( const S & seed) const
inlineconstexpr
Parameters
seedthe first state.
Returns
the walk from it.

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