public function filter($func) { $ret = new static(); foreach ($this as $obj) { if ($func($obj)) { $ret->add($obj); } } return $ret; }