HH\ImmMap::fromItems

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

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

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

Parameters

Returns

Examples

See [Map::fromItems](</hack/reference/class/Map/fromItems/#examples>) for usage examples.