Creates a ReducerOperator — an array reduce operator to a single value.
— array element type
— reduce function
Optional
— default value for an empty array
const op = createReducerOperator<number>((acc, curr) => acc + curr, 0);op.apply([1, 2, 3]); // 6op.apply([]); // 0 Copy
const op = createReducerOperator<number>((acc, curr) => acc + curr, 0);op.apply([1, 2, 3]); // 6op.apply([]); // 0
Creates a ReducerOperator — an array reduce operator to a single value.