src/QCheck/FP.php
public static function filter(callable $f, $coll)
    {
        foreach ($coll as $x) {
            if (call_user_func($f, $x)) {
                yield $x;
            }
        }
    }
public static function filter(callable $f, $coll)
    {
        foreach ($coll as $x) {
            if (call_user_func($f, $x)) {
                yield $x;
            }
        }
    }
public static function filter ( callable $ f , $ coll ) { foreach ( $ coll as $ x ) { if ( call_user_func ( $ f , $ x ) ) { yield $ x ; } } }
Filter the given iterable collection using the callback in a
lazy way.

@param callable $f
@param $coll
@return \Generator
Filter the given iterable collection using the callback in a lazy way .