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

The coalgebra of take<K>: the walk, until K elements are present. One more state, the count so far; O(1), no storage. More...

Collaboration diagram for dedekind::category::detail_comprehension::Taken< S, Coalg, K >:

Public Types

using Yield = std::invoke_result_t<const Coalg&, const S&>
using Element = std::remove_cvref_t<decltype(std::declval<Yield>()->first)>

Public Member Functions

constexpr std::optional< std::pair< Element, std::pair< S, std::size_t > > > operator() (const std::pair< S, std::size_t > &s) const

Public Attributes

Coalg coalg

Detailed Description

template<std::regular S, std::semiregular Coalg, std::size_t K>
struct dedekind::category::detail_comprehension::Taken< S, Coalg, K >

The coalgebra of take<K>: the walk, until K elements are present. One more state, the count so far; O(1), no storage.


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