HH\Set::filter
Returns a Set
containing the values of the current Set
that meet
a supplied condition applied to each value
public function filter(
(function(Tv):bool) $callback,
): Set<Tv>;
Only values that meet a certain criteria are affected by a call to
filter()
, while all values are affected by a call to map()
.
Parameters
(function(Tv):bool) $callback
- The callback containing the condition to apply to the currentSet
values.