<?php public function filter(?callable $f = null): self
{
return is_null($f)
? new static(array_values(array_filter($this->items)))
: new static(array_values(array_filter($this->items, $f)));
}
<?php {
return is_null($f)
? new static(array_values(array_filter($this->items)))
: new static(array_values(array_filter($this->items, $f)));
}
public function first(callable $f)