Package: effect
Module: HashSet
Returns the number of values in the HashSet.
Example (Getting the HashSet size)
import { HashSet } from "effect"
const empty = HashSet.empty<string>()
console.log(HashSet.size(empty)) // 0
const small = HashSet.make("a", "b")
console.log(HashSet.size(small)) // 2
const withDuplicates = HashSet.fromIterable(["x", "y", "z", "x", "y"])
console.log(HashSet.size(withDuplicates)) // 3
Signature
declare const size: <V>(self: HashSet<V>) => number
Since v2.0.0