HH\Lib\Vec\filter_with_key

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_with_key<Tk, Tv>(
    KeyedTraversable<Tk, Tv> $traversable,
  (function(Tk,Tv):bool) $predicate,
): vec<Tv>;

If you don't need access to the key, see Vec\filter().

Parameters