Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::Reverse Struct Referenceexport

An involution on a carrier that is not a number: reversing a word twice is the identity, on any word a value holds, a std::string or a std::vector of letters; not a view, whose copy would alias the caller's letters. A pure function object, value in and value out, so that it is an arrow in the sense of the Jlt paper's Rule 1, and a family of them, one per word type, as std::logical_not is one per truth type; endo<W>(rev) names the domain. More...

Public Member Functions

template<std::ranges::bidirectional_range W>
requires std::semiregular<W> && (!std::ranges::view<W>) && std::permutable<std::ranges::iterator_t<W>>
constexpr W operator() (W s) const
constexpr std::strong_ordering operator() (std::strong_ordering o) const
 A three-way comparison reversed, less ↔ greater and equal fixed: the comparison in the opposite order, for carriers that compute an ordering one way round and flip it (the reals' cut and field comparisons), written once.
constexpr bool operator== (const Reverse &) const =default

Detailed Description

An involution on a carrier that is not a number: reversing a word twice is the identity, on any word a value holds, a std::string or a std::vector of letters; not a view, whose copy would alias the caller's letters. A pure function object, value in and value out, so that it is an arrow in the sense of the Jlt paper's Rule 1, and a family of them, one per word type, as std::logical_not is one per truth type; endo<W>(rev) names the domain.


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