Skip to content

Instantly share code, notes, and snippets.

@ship561
Created January 9, 2012 19:55
Show Gist options
  • Save ship561/1584616 to your computer and use it in GitHub Desktop.
Save ship561/1584616 to your computer and use it in GitHub Desktop.
let statement in joining sto lines
(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