Functional trie implementations in OCaml.
Both an immutable version using maps and a mutable version using hash tables are included. There is also some example code in each file to count prefix completions, given input containing words to add and prefixes to find.
Interestingly, the immutable version performs better.