Package: effect
Module: Trie
Returns an IterableIterator of the values within the Trie.
Details
Values are ordered based on their key in alphabetical order, regardless of insertion order.
Example (Reading values by key order)
import { Trie } from "effect"
import * as assert from "node:assert"
const trie = Trie.empty<number>().pipe(
Trie.insert("call", 0),
Trie.insert("me", 1),
Trie.insert("and", 2)
)
const result = Array.from(Trie.values(trie))
assert.deepStrictEqual(result, [2, 0, 1])
Signature
declare const values: <V>(self: Trie<V>) => IterableIterator<V>
Since v2.0.0