HH\Map::addAll

For every element in the provided Traversable, add a key/value pair into the current Map

public function addAll(
  ?Traversable<Pair<Tk,Tv>> $iterable,
): Map<Tk, Tv>;

This method is equivalent to Map::setAll(). If a key in the Traversable exists in the Map, then the value associated with that key in the Map is overwritten.

Future changes made to the current Map ARE reflected in the returned Map, and vice-versa.

Parameters

  • ?Traversable<Pair<Tk,Tv>> $iterable

Return Values