Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::Until< End, Step > Struct Template Referenceexport

The chain in arrows (the Jlt paper, Listing 3). Three arrows make it: an end, a predicate on the states; a step, an endo; a seed, a point. until(end, step) is the guard, after the Haskell Prelude's until, the partial step \(N \to 1 + N\) a cartesian category builds as \(\langle end, 1\rangle ; dist ; (! + step)\). chain(out) is the anamorphism as an arrow \(N \to N^*\), so a seed composed into it, x >> chain(out), is its chain. ns >> f is the functor's action, f mapped over the elements, the coalgebra's emitted leg post-composed, \((1 + f \times 1) \circ out\), and map id is the chain itself, decided at the type. A fold over the composite is a hylomorphism: nothing between the seed and the fold is built. More...

Collaboration diagram for dedekind::category::Until< End, Step >:

Public Types

using Domain = Dom<Step>
using Codomain = std::optional<Domain>

Public Member Functions

constexpr Codomain operator() (const Domain &n) const
constexpr bool operator== (const Until &) const =default

Public Attributes

End end
Step step

Detailed Description

template<IsArrow End, IsArrow Step>
requires std::same_as<Dom<End>, Dom<Step>> && std::same_as<Cod<Step>, Dom<Step>> && std::convertible_to<Cod<End>, bool>
struct dedekind::category::Until< End, Step >

The chain in arrows (the Jlt paper, Listing 3). Three arrows make it: an end, a predicate on the states; a step, an endo; a seed, a point. until(end, step) is the guard, after the Haskell Prelude's until, the partial step \(N \to 1 + N\) a cartesian category builds as \(\langle end, 1\rangle ; dist ; (! + step)\). chain(out) is the anamorphism as an arrow \(N \to N^*\), so a seed composed into it, x >> chain(out), is its chain. ns >> f is the functor's action, f mapped over the elements, the coalgebra's emitted leg post-composed, \((1 + f \times 1) \circ out\), and map id is the chain itself, decided at the type. A fold over the composite is a hylomorphism: nothing between the seed and the fold is built.

chain__Chain_As_Arrows

Member Function Documentation

◆ operator()()

template<IsArrow End, IsArrow Step>
Codomain dedekind::category::Until< End, Step >::operator() ( const Domain & n) const
inlineconstexpr
Parameters
na state.
Returns
nothing at the end, else the step of n.

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