Performs a tree-like reduction of all elements of a product type.
On record types, this function operates on the underlying values, not on the fields themselves.
namespace kumi::result
{
template<mono
id M, product_type T,
typename Value>
struct reduce;
template<monoid M, product_type T, typename Value>
}
constexpr auto reduce(M &&m, T &&t)
Performs a tree-like reduction of all elements of a product type.
Definition reduce.hpp:72
#include <kumi/kumi.hpp>
#include <iostream>
int main()
{
}
constexpr boolean_and bit_and
Forms a binary monoid callable that can be used in kumi::algoritm. It represents the logical and oper...
Definition monoid.hpp:154
constexpr numeric_prod multiplies
Forms a binary monoid callable that can be used in kumi::algoritm. It represents the multiplication.
Definition monoid.hpp:145
constexpr numeric_add plus
Forms a binary monoid callable that can be used in kumi::algoritm. It represents the addition.
Definition monoid.hpp:136
constexpr boolean_or bit_or
Forms a binary monoid callable that can be used in kumi::algoritm. It represents the logical or opera...
Definition monoid.hpp:163
constexpr boolean_xor bit_xor
Forms a binary monoid callable that can be used in kumi::algoritm. It represents the logical xor oper...
Definition monoid.hpp:172
Fixed-size collection of heterogeneous values.
Definition tuple.hpp:33