public HashSet(collection as Collection<T>):
Creates a hash set from a collection. Duplicate values are ignored as they are added.
| Parameter | Description |
|---|---|
collection | The collection to copy elements from. |
import klyn.collections s = HashSet<Int>([1, 2, 2, 3]) assert s.size == 3