src/DS/Traits/TraitSequence.php
public function set(int $index, $value): Sequence
    {
        $this->offsetSet($index, $value);

        return $this;
    }
public function set(int $index, $value): Sequence
    {
        $this->offsetSet($index, $value);

        return $this;
    }
public function set ( int $ index , $ value ) : Sequence { $ this -> offsetSet ( $ index , $ value ) ; return $ this ; }
Replaces the value at a given index in the sequence with a new value.

@param int   $index
@param mixed $value

@return \PlanB\DS\Sequence

@throws \OutOfRangeException if the index is not in the range [0, size-1]
Replaces the value at a given index in the sequence with a new value .