HH\Map::fromItems

Creates a Map from the given Traversable, or an empty Map if null is passed

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

This is the static method version of the Map::__construct() constructor.

Parameters

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

Return Values