Creates a new ISet instance from an iterable of elements.
This factory function accepts any iterable of elements, including arrays,
JavaScript Sets, other ISets, or custom iterables. Duplicate elements in
the input iterable will be automatically deduplicated in the resulting
set.
Performance: O(n) where n is the number of elements in the iterable.
Type Parameters
KextendsPrimitive
The type of the elements. Must extend MapSetKeyType.
Creates a new ISet instance from an iterable of elements.
This factory function accepts any iterable of elements, including arrays, JavaScript Sets, other ISets, or custom iterables. Duplicate elements in the input iterable will be automatically deduplicated in the resulting set.
Performance: O(n) where n is the number of elements in the iterable.