Package: effect
Module: HashSet
Creates an empty HashSet.
Example (Creating an empty HashSet)
import { HashSet } from "effect"
const set = HashSet.empty<string>()
console.log(HashSet.size(set)) // 0
console.log(HashSet.isEmpty(set)) // true
// Add some values
const withValues = HashSet.add(HashSet.add(set, "hello"), "world")
console.log(HashSet.size(withValues)) // 2
Signature
declare const empty: <V = never>() => HashSet<V>
Since v2.0.0