src/main/php/Result.php
public function applyWhenEmpty(callable $other): self
    {
        if (!$this->isEmpty($this->value)) {
            return $this;
        }

        return self::of($other());
    }
public function applyWhenEmpty(callable $other): self
    {
        if (!$this->isEmpty($this->value)) {
            return $this;
        }

        return self::of($other());
    }
public function applyWhenEmpty ( callable $ other ) : self { if ( ! $ this -> isEmpty ( $ this -> value ) ) { return $ this ; } return self :: of ( $ other ( ) ) ; }
returns the result if value is not empty, or the result of applied other

@param   callable  $other
@return  \stubbles\values\Result
@since   6.2.0
returns the result if value is not empty or the result of applied other