Created
December 17, 2012 13:24
-
-
Save mihneadb/4318257 to your computer and use it in GitHub Desktop.
Hamming distance in Clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (def x "AAAABCDBC") | |
#'user/x | |
user=> (def y "AABBBCCBC") | |
#'user/y | |
user=> (count (filter true? (map (partial reduce not=) (map vector x y)))) | |
3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment