(values: Iterable<V>)
| 73 | |
| 74 | /** @internal */ |
| 75 | export const fromIterable = <V>(values: Iterable<V>): HashSet<V> => { |
| 76 | let map = HashMap.empty<V, boolean>() |
| 77 | for (const value of values) { |
| 78 | map = HashMap.set(map, value, true) |
| 79 | } |
| 80 | return makeImpl(map) |
| 81 | } |
| 82 | |
| 83 | /** @internal */ |
| 84 | export const has = <V>(self: HashSet<V>, value: V): boolean => HashMap.has(keyMap(self), value) |