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
?Traversable<Pair<Tk,Tv>> $iterable
Returns
ImmMap<Tk,Tv>- AnImmMapwith the key/value pairs from theTraversable; or an emptyImmMapif theTraversableisnull.
Examples
See [Map::fromItems](</hack/reference/class/Map/fromItems/#examples>) for usage examples.