Erlang: What is most-wrong with this trie implementation?
问题 Over the holidays, my family loves to play Boggle. Problem is, I'm terrible at Boggle. So I did what any good programmer would do: wrote a program to play for me. At the core of the algorithm is a simple prefix trie, where each node is a dict of references to the next letters. This is the trie:add implementation: add([], Trie) -> dict:store(stop, true, Trie); add([Ch|Rest], Trie) -> % setdefault(Key, Default, Dict) -> % case dict:find(Key, Dict) of % { ok, Val } -> { Dict, Val } % error -> {