fold
Applies an operator to all elements of an array and accumulates the results during iteration.
Syntax
(fold operator)Signatures
- Type
with
where(fold op): <<n>>(T1;T2^n; ... ;Tm^n) returns (T1)op: (T1;T2; ... ;Tm) returns (T1)T1the type of the accumulator.In this signature, T1 can be extended to a named group where each group field is an accumulator.
- Causality
The resulting operator (fold op) is an operator where each of its outputs depends instantaneously on all of its inputs.
Initialization
The resulting operator (fold op) has its first value defined if all inputs have their first values defined.
Clock
The resulting operator (fold op) has the same clock as its inputs and outputs.