Math: sum
Calculate the total addition of numbers. Inputs can be Numbers or Arrays of
numbers — nested arrays are recursively flattened and summed. If no input
values are received, the output is the Initial value (default 0).
Example
# Example with no initial value:
Input: [1, 2, 3, 4]
Ouput: 10
# Example with initial value = 10:
Input: [1, 2, 3, 4]
Ouput: 20
# Example with nested arrays:
Input: [1, [2, [3, 4]]]
Ouput: 10
# Example with no input and initial value = 5:
Ouput: 5
Parameters
Initial value
Constant added to the sum of the inputs. Defaults to 0 when left empty.
Input
Number (multiple)required
Numbers or Arrays of numbers. Arrays (including nested ones) are
recursively flattened and their elements summed. When nothing is wired or
no values arrive, the output is just the Initial value.
Output
Number
Result of the addition (sum of all inputs plus the Initial value).