function __construct($seq, $callback) { parent::__construct($seq); if (!is_callable($callback)) { throw new InvalidArgumentException(); } $this->callback = $callback; }
function __construct($seq, $init, $callback) { parent::__construct($seq); if (!is_callable($callback)) { throw new InvalidArgumentException(); } $this->callback = $callback; $this->initialValue = $init; $this->accumulator = $init; $this->isCached = false; }
function __construct($first, $fn) { list($this->first, $this->fn) = func_get_args(); $this->current_value = $first; parent::__construct($this); }
function __construct($seq, $size) { parent::__construct($seq); $this->size = $size; }