• Effekt Logo Effekt Library
    • dictionary
      • Dictionary
        • Empty
        • Leaf
        • Branch
        • Node
      • insert
      • insert
      • lookup
      • lookup
      • Tagged
      • collect
      • each
      • eachTagged
    • dictionary
    • Jump to source: libraries/common/dictionary.effekt
      Example usage: examples/stdlib/dictionary
      • Dictionary [A]
      • A trie-based dictionary for efficient key-value storage with bytearray keys.
        Supports String and ByteArray keys with fast lookup and insertion.
        • Empty
        • Leaf (value: A)
        • Branch (children: Array[Dictionary[A]])
        • Node (value: A, children: Array[Dictionary[A]])
      • insert [A] (trie: Dictionary[A], key: String, value: A): Dictionary[A] / {}
      • Insert a value with a String key.
      • insert [A] (trie: Dictionary[A], key: ByteArray, value: A): Dictionary[A] / {}
      • Insert a key-value pair into the dictionary with a ByteArray key.
      • lookup [A] (trie: Dictionary[A], key: String): Option[A] / {}
      • Look up a value in the dictionary by string key.
      • lookup [A] (trie: Dictionary[A], key: ByteArray): Option[A] / {}
      • Look up a value in the dictionary by bytearray key.
      • Tagged [A] (key: ByteArray, value: A)
      • A record pairing a key with a value for use in streams.
      • collect [A] { stream: => Unit / {emit[Tagged[A]]} }: Dictionary[A] / {}
      • Collect key-value pairs from a stream of Tagged elements into a Dictionary.
      • each [A] (trie: Dictionary[A]): Unit / {emit[A]}
      • Emit all values stored in the dictionary as a push stream.
      • eachTagged [A] (trie: Dictionary[A]): Unit / {emit[Tagged[A]]}
      • Emit all key-value pairs stored in the dictionary as a push stream of Tagged elements.