HH\Set::takeWhile

Returns a Set containing the values of the current Set up to but not including the first value that produces false when passed to the specified callback

public function takeWhile(
  (function(Tv):bool) $callback,
): Set<Tv>;

The returned Set will always be a proper subset of the current Set.

Parameters

  • (function(Tv):bool) $callback

Return Values

  • Set<Tv> - A Set that is a proper subset of the current Set up until the callback returns false.