public function withoutElement(int $idx): self
    {
        if (!isset($this->_elements[$idx])) {
            throw new \OutOfBoundsException(
                "Structure doesn't have element at index $idx.");
        }
        $obj = clone $this;
        array_splice($obj->_elements, $idx, 1);
        return $obj;
    }
public function withoutElement(int $idx): self
    {
        if (!isset($this->_elements[$idx])) {
            throw new \OutOfBoundsException(
                "Structure doesn't have element at index $idx.");
        }
        $obj = clone $this;
        array_splice($obj->_elements, $idx, 1);
        return $obj;
    }
public function withoutElement ( int $ idx ) : self { if ( ! isset ( $ this -> _elements [ $ idx ] ) ) { throw new \ OutOfBoundsException ( "Structure doesn't have element at index $idx." ) ; } $ obj = clone $ this ; array_splice ( $ obj -> _elements , $ idx , 1 ) ; return $ obj ; }
Get self with an element at the given index removed.

@param int $idx Element index
@throws \OutOfBoundsException
@return self
Get self with an element at the given index removed .