Skip to content

Instantly share code, notes, and snippets.

@chrix75
chrix75 / word_comp.clj
Created August 18, 2013 16:36
Compare 2 words managing the keyboard mistakes.
(defn inversion?
[c1 n1 c2 n2]
(and (= c1 n2) (= n1 c2)))
(defn deletion?
[c1 c2 n1]
(and (not= c1 c2) (= n1 c2)))
(defn insertion?
[c1 c2 n2]