src/main/php/Result.php
public function filter(callable $predicate): self
    {
        if ($this->isPresent() && $predicate($this->value)) {
            return $this;
        }

        return self::$null;
    }
public function filter(callable $predicate): self
    {
        if ($this->isPresent() && $predicate($this->value)) {
            return $this;
        }

        return self::$null;
    }
public function filter ( callable $ predicate ) : self { if ( $ this -> isPresent ( ) && $ predicate ( $ this -> value ) ) { return $ this ; } return self :: $ null ; }
returns result when value is present and fulfills the predicate

In case the value is null or or doesn't fulfill the predicate the return
value is a null result.

@param   callable  $predicate
@return  \stubbles\values\Result
returns result when value is present and fulfills the predicate