public function __construct($seed, callable $unaryOperator) { $this->unaryOperator = $unaryOperator; $this->current = $seed; $this->key = 0; parent::__construct(new \ArrayIterator([$seed])); }