HH\ImmSet::fromItems
Creates an ImmSet from the given Traversable, or an empty ImmSet if
null is passed
public static function fromItems(
?Traversable<Tv> $iterable,
): ImmSet<Tv>;
This is the static method version of the ImmSet::__construct()
constructor.
Parameters
?Traversable<Tv>$iterable
Returns
ImmSet<Tv>- AnImmSetwith the values from theTraversable; or an emptyImmSetif theTraversableisnull.
Examples
See [Set::fromItems](</hack/reference/class/Set/fromItems/#examples>) for usage examples.