HH\ImmSet::fromItems

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

Description

public static function fromItems(
  ?Traversable<Tv> $items,
): ImmSet<Tv>

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

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

Parameters

Return Values

Examples

See Set::fromItems for usage examples.