cpp/experimental/transform reduce

Applies to each element in the range $[first; last)$ and reduces the results (possibly permuted and aggregated in unspecified manner) along with the initial value  over.

The behavior is non-deterministic if is not associative or not commutative.

The behavior is undefined if or  modifies any element or invalidates any iterator in $[first; last)$.

Return value
Generalized sum of and, , ... over ,

where generalized sum $GSUM(op, a 1, ..., a N)$ is defined as follows:
 * if $N=1$, $a 1$
 * if $N > 1$, $op(GSUM(op, b 1, ..., b K), GSUM(op, b M, ..., b N))$ where
 * $b 1, ..., b N$ may be any permutation of $a1, ..., aN$ and

in other words, the results of unary_op may be grouped and arranged in arbitrary order.

Complexity
$1 < K+1 = M ≤ N$ applications each of and.