effect-io-ai

Package: effect
Module: HashSet

HashSet.values

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

Signature

declare const values: <A>(self: HashSet<A>) => IterableIterator<A>

Source

Since v2.0.0