public function minimum(callable $function = null) { $min = null; $first = true; foreach ($this->mapIterator($function) as $value) { if ($value < $min || $first) { $min = $value; $first = false; } } return $min; }