public function reduce(callable $function, $accumulator) { foreach ($this->value as $item) { $accumulator = call_user_func($function, $accumulator, $item); } return $accumulator; }