public function withInserted(int $idx, Element $el): self
    {
        if (count($this->_elements) < $idx || $idx < 0) {
            throw new \OutOfBoundsException("Index $idx is out of bounds.");
        }
        $obj = clone $this;
        array_splice($obj->_elements, $idx, 0, [$el]);
        return $obj;
    }