Created
July 22, 2015 19:04
-
-
Save goral09/07cb151497ec15bac8c5 to your computer and use it in GitHub Desktop.
clojure version
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
(defn hiddenMsg [size seq] | |
(frequencies (map #(apply str %) (partition size 1 seq))) | |
) | |
(hiddenMsg 2 "ATAATGATATTAGAGACAAT") | |
;{"AA" 2, "TT" 1, "AC" 1, "AG" 2, "TA" 3, "AT" 5, "TG" 1, "GA" 3, "CA" 1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment