kumi v3.1.0
Exquisite Epidote
Loading...
Searching...
No Matches
Tuple Transformations

Algorithms applying transformation to tuple. More...

Functions

template<typename Function, concepts::product_type T>
requires _::supports_apply<Function, T>
constexpr decltype(auto) kumi::apply (Function &&f, T &&t) noexcept(_::supports_nothrow_apply< Function &&, T && >)
 Invoke the Callable object f with a product_type of arguments. f is applied on the values if the given product_type is a kumi::record.
template<typename Function, concepts::product_type Tuple, concepts::product_type... Tuples>
requires ((concepts::compatible_product_types<Tuple, Tuples...>) && (_::supports_call<Function&, Tuple, Tuples...>))
constexpr void kumi::for_each (Function f, Tuple &&t, Tuples &&... ts)
 Applies the Callable object f on each element of a kumi::product_type. f is applied on the values if the given product_type is a kumi::record.
template<typename Function, concepts::record_type Tuple, concepts::record_type... Tuples>
constexpr void kumi::for_each_field (Function f, Tuple &&t, Tuples &&... ts)
 Applies the Callable object f on each element of a kumi::record_type and its field.
template<typename Function, concepts::product_type Tuple, concepts::product_type... Tuples>
constexpr void kumi::for_each_index (Function f, Tuple &&t, Tuples &&... ts)
 Applies the Callable object f on each element of a kumi::product_type and its index.
template<concepts::product_type Tuple, typename Function, concepts::sized_product_type< size_v< Tuple > >... Tuples>
requires (concepts::compatible_product_types<Tuple, Tuples...> && _::supports_call<Function, Tuple &&, Tuples && ...>)
constexpr auto kumi::map (Function f, Tuple &&t0, Tuples &&... others)
 Apply the Callable object f on each tuples' elements.
template<concepts::record_type Tuple, typename Function, concepts::sized_product_type< size< Tuple >::value >... Tuples>
constexpr auto kumi::map_field (Function f, Tuple &&t0, Tuples &&... others)
 Apply the Callable object f on each records' elements and their field names.
template<concepts::product_type Tuple, typename Function, concepts::sized_product_type< size_v< Tuple > >... Tuples>
requires (!concepts::record_type<Tuple> && (!concepts::record_type<Tuples> && ...))
constexpr auto kumi::map_index (Function f, Tuple &&t0, Tuples &&... others)
 Apply the Callable object f on each tuples' elements and their indexes.