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>
- AnImmSet
with the values from theTraversable
; or an emptyImmSet
if theTraversable
isnull
.
Examples
See [Set::fromItems
](</hack/reference/class/Set/fromItems/#examples>) for usage examples.