transform_reduce
function transform_reduce<Value>(x:Value[_], init:Value, op1:@(Value, Value) -> Value, op2:@(Value) -> Value) -> Value
Unary transformation and reduction.
- x: First operand.
- init: Initial value.
- op1: Reduction operator.
- op2: Transformation operator.
function transform_reduce<Value>(x:Value[_], y:Value[_], init:Value, op1:@(Value, Value) -> Value, op2:@(Value, Value) -> Value) -> Value
Binary transformation and reduction.
- x: First operand.
- y: Second operand.
- init: Initial value.
- op1: Reduction operator.
- op2: Transformation operator.
function transform_reduce<Value>(x:Value[_], y:Value[_], z:Value[_], init:Value, op1:@(Value, Value) -> Value, op2:@(Value, Value, Value) -> Value) -> Value
Ternary transformation and reduction.
- x: First operand.
- y: Second operand.
- z: Third operand.
- init: Initial value.
- op1: Reduction operator.
- op2: Transformation operator.