What mashigan wrote may well be best suited to your exact purpose. Another 
possibility at least worth a shout out is `collections/critbits` which 
implements an efficient `keysWithPrefix`. For more fuzzy still than prefix 
matching, you could also do some kind of efficient edit distance-based thing, 
but data-structures to (attempt to) optimize that are complicated. (There is 
`std/editdistance`, though).

Reply via email to