Package: effect
Module: HashSet
Returns an IterableIterator of the values in the HashSet.
Time complexity: O(1)
Example
import { HashSet, pipe } from "effect"
const numberIterable = pipe(
HashSet.make(0, 1, 1, 2), // HashSet.HashSet<number>
HashSet.values // takes an HashSet<A> and returns an IterableIterator<A>
)
for (const number of numberIterable) {
console.log(number) // it will logs: 0, 1, 2
}
See
HashSet getters are module:HashSet.toValues module:HashSet.sizeSignature
declare const values: <A>(self: HashSet<A>) => IterableIterator<A>
Since v2.0.0