HH\Lib\Vec\filter

This API is part of the Hack Standard Library, not HHVM itself.

Returns a new vec containing only the values for which the given predicate returns true

namespace HH\Lib\Vec;

function filter<Tv>(
    Traversable<Tv> $traversable,
  ?(function(Tv):bool) $value_predicate = NULL,
): vec<Tv>;

The default predicate is casting the value to boolean.

Parameters