Last active
June 30, 2024 14:39
-
-
Save trikitrok/6f77b18ca7f1fec4c65e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (ns dna) | |
| (defn hamming-distance [strand1 strand2] | |
| (reduce | |
| + | |
| (map | |
| (fn [base1 base2] | |
| (if (= base1 base2) 0 1)) | |
| strand1 | |
| strand2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment