Package: effect
Module: HashSet
Returns an Array of the values within the HashSet.
Time complexity: O(n) where n is the number of elements in the set
Example
import { HashSet, pipe } from "effect"
import { deepStrictEqual } from "node:assert/strict"
deepStrictEqual(
pipe(
HashSet.make(0, 1, 1, 2), // HashSet<number>
HashSet.toValues // takes an HashSet<A> and returns an Array<A>
),
Array.of(0, 1, 2)
)
See
HashSet getters are module:HashSet.values module:HashSet.sizeSignature
declare const toValues: <A>(self: HashSet<A>) => Array<A>
Since v3.13.0