@lang:reduce
Reduce an array to a single value by applying a helper.
Returns: any
Syntax
Section titled “Syntax”@lang:reduce(arr fn initial)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
arr | array | Source array |
fn | helper | Reducer helper receiving (accumulator, element) |
initial | any | Initial accumulator value |