Hi,

there's the levenshtein distance algorithm which will help you
determine which string is one "edit" close to another (since all your
strings are of length 3, then the distance will inevitably be a single
replacement if of size one).

Don't know if that helps, anyway here's a compact functional
implementation: https://gist.github.com/828413

2011/5/30 joshua-choi <rbysam...@gmail.com>:
> Let's say that I have a set of strings, each three English letters
> long.
>
> How can I determine which strings differ only at one location (e.g.
> "xxe" and "xbe")?
>
> Right now, I'm writing a loop that sequentially compares every string
> to every other string. I think that there's a better way, but I don't
> know where to start.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to