(buckets: HashBuckets, value: unknown)
| 3104 | } |
| 3105 | |
| 3106 | const hashBucketsHas = (buckets: HashBuckets, value: unknown): boolean => { |
| 3107 | const bucket = buckets.get(Hash.hash(value)) |
| 3108 | if (bucket === undefined) { |
| 3109 | return false |
| 3110 | } |
| 3111 | for (const candidate of bucket) { |
| 3112 | if (Equal.equals(candidate, value)) { |
| 3113 | return true |
| 3114 | } |
| 3115 | } |
| 3116 | return false |
| 3117 | } |
| 3118 | |
| 3119 | /** |
| 3120 | * Computes the union of two arrays using a custom equivalence, removing |