find_string(table::Dict, string) = get!(table, string, string) table = Dict()
a1 = find_string(table, "a") a2 = find_string(table, "a") # called w/ different string, will return first one a1 === a2 # true, same string Maybe you could also use a Set, but I don't know how to get the elements that matches, not just test for it with `in`. Best, Tamas On Fri, Apr 22 2016, Lyndon White wrote: > @Tamas thanks > Can you clarify a Dict of strings to what? Ints? > Loose a lot of interpretablity that way. > > > On Friday, 22 April 2016 19:08:11 UTC+8, Tamas Papp wrote: >> >> I would be more concerned about style than speed -- symbols as strings >> is an ancient Lisp technique in NLP, but IMO a Dict of strings would be >> better style. >> >> >>
