public function reduce($iterable, $closure = 'add', $initializer = null)
    {
        return Itertools\reduce($iterable, $closure, $initializer);
    }
public function reduce($iterable, $closure = 'add', $initializer = null)
    {
        return Itertools\reduce($iterable, $closure, $initializer);
    }
public function reduce ( $ iterable , $ closure = 'add' , $ initializer = null ) { return Itertools \ reduce ( $ iterable , $ closure , $ initializer ) ; }
Reduce an iterable to a single value

Simple examples:
{{ [1,2,3]|reduce }} --> 6
{{ [1,2,3]|reduce('max') }} --> 3

Sro example to get the prices for all items in the basket:
{{ transaction_snapshot.Basket.Items|map('TotalPrice.Amount')|reduce }}

@param array|string|\Iterator $iterable
@param string|\Closure $closure
@param mixed $initializer
@return mixed
Reduce an iterable to a single value