A simple implementation of a Trie data structure
///|
using @trie {type Trie}
///|
test {
let trie = Trie::of([("--search", "search"), ("--switch", "switch")])
inspect(trie.lookup("--search"), content="Some(\"search\")")
let trie = trie.add("-s", "s")
inspect(trie.lookup("-s"), content="Some(\"s\")")
inspect(trie.lookup("--switch"), content="Some(\"switch\")")
}#alias(T)
type Trie[A]A simple implementation of a Trie data structure