A binary operation curried, with named arrows throughout (the Jlt paper, Listing 3): curry<T>(op) is \(T \to T^T\), its value at a the operator section \(b \mapsto op(a, b)\), Haskell's (a +), and uncurry takes it back to \(T \times T \to U\). A chain's end and step are such sections: curry<N>(greater_equal<N>{})(unit) stops at the unit, curry<N>(plus<N>{})(1) is the successor.
More...
|
| constexpr Codomain | operator() (const T &b) const |
|
constexpr bool | operator== (const Section &o) const |
| | Two sections are equal when their elements are and, for an operation with state, their operations are; an operation with state and no == offers no equality. A stateless operation is its type.
|
template<typename T, typename Op>
requires std::regular_invocable<const Op&, const T&, const T&>
struct dedekind::category::Section< T, Op >
A binary operation curried, with named arrows throughout (the Jlt paper, Listing 3): curry<T>(op) is \(T \to T^T\), its value at a the operator section \(b \mapsto op(a, b)\), Haskell's (a +), and uncurry takes it back to \(T \times T \to U\). A chain's end and step are such sections: curry<N>(greater_equal<N>{})(unit) stops at the unit, curry<N>(plus<N>{})(1) is the successor.
cartesian__Curry_Of_An_Operation
- Template Parameters
-
| T | the carrier. |
| Op | the operation. |
◆ Codomain
template<typename T, typename Op>
Initial value:
std::remove_cvref_t<std::invoke_result_t<const Op&, const T&, const T&>>
◆ operator()()
template<typename T, typename Op>
- Parameters
-
- Returns
op(a, b).
The documentation for this struct was generated from the following file: