HH\Set::zip

Throws an exception unless the current Set or the Traversable is empty

public function zip<Tu>(
  Traversable<Tu> $traversable,
): Set<Pair<Tv, Tu>>;

Since Sets only support integers or strings as values, we cannot have a Pair as a Set value. So in order to avoid an InvalidArgumentException, either the current Set or the Traversable must be empty so that we actually return an empty Set.

Parameters

Return Values