public function withDegree(Integer $degree, Number $coeff): self
    {
        $degrees = $this->degrees->put(
            $degree->value(),
            new Degree($degree, $coeff)
        );

        return new self(
            $this->intercept,
            ...$degrees->values()
        );
    }
public function withDegree(Integer $degree, Number $coeff): self
    {
        $degrees = $this->degrees->put(
            $degree->value(),
            new Degree($degree, $coeff)
        );

        return new self(
            $this->intercept,
            ...$degrees->values()
        );
    }
public function withDegree ( Integer $ degree , Number $ coeff ) : self { $ degrees = $ this -> degrees -> put ( $ degree -> value ( ) , new Degree ( $ degree , $ coeff ) ) ; return new self ( $ this -> intercept , ... $ degrees -> values ( ) ) ; }
Create a new polynom with this added degree

@param Integer $degree
@param Number $coeff

@return self
Create a new polynom with this added degree