public function filter($predicate) {
        if (!is_callable($predicate)) {
            throw new Exception("Can't call Some#filter with a non callable.");
        }
        if ($predicate($this->_value)) {
            return $this;
        } else {
            return new None();
        }
    }
public function filter($predicate) {
        if (!is_callable($predicate)) {
            throw new Exception("Can't call Some#filter with a non callable.");
        }
        if ($predicate($this->_value)) {
            return $this;
        } else {
            return new None();
        }
    }
public function filter ( $ predicate ) { if ( ! is_callable ( $ predicate ) ) { throw new Exception ( "Can't call Some#filter with a non callable." ) ; } if ( $ predicate ( $ this -> _value ) ) { return $ this ; } else { return new None ( ) ; } }
This function takes a callable as a predicate that takes the wrapped
value of the current `Some` as it's argument. If the predicate returns
true the current `Some` is returned. If the predicate returns false
a new `None` is returned.

@param Callable $predicate - The predicate to check the wrapped value
@return Option             - `Some` on success `None` on failure
@throws Exception
This function takes a callable as a predicate that takes the wrapped value of the current Some as it s argument . If the predicate returns true the current Some is returned . If the predicate returns false a new None is returned .