Skip to content

Instantly share code, notes, and snippets.

@leblowl
Created May 14, 2015 18:57
Show Gist options
  • Save leblowl/01d6f4d8e5d4261959ee to your computer and use it in GitHub Desktop.
Save leblowl/01d6f4d8e5d4261959ee to your computer and use it in GitHub Desktop.
Util fun
(defn slurp-edn [f]
(with-open [r (PushbackReader. (io/reader f))]
(let [edn-seq (repeatedly (partial edn/read {:eof :EOF} r))]
(doall (take-while #(not= :EOF %) edn-seq)))))
(defn in?
"true if seq contains elm"
[seq elm]
(some #(= elm %) seq))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment