Created
January 9, 2012 19:55
-
-
Save ship561/1584616 to your computer and use it in GitHub Desktop.
let statement in joining sto lines
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
(let [[nm sq] (cond | |
(.startsWith l "#=GC SS_cons") | |
[(str/join " " (butlast (str/split #"\s+" l))) (last (str/split #"\s+" l))] ;;splits the line apart and hopefully creates vector ["#GC SS_cons" structure] | |
(.startsWith l "#") | |
(str/split #"\s{2,}+" l) | |
:else | |
(str/split #"\s+" l)) | |
prev (get m nm [(gen-uid) ""])] | |
(assoc m nm [(first prev) | |
(str (second prev) sq)])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment