Skip to content

Instantly share code, notes, and snippets.

@brweber2
brweber2 / gist:2649948
Created May 10, 2012 00:09 — forked from djKianoosh/gist:2648751
Some Clojure functions to help read IIS log files into maps
(defn comment? [s]
(.startsWith s "#"))
(defn not-comment? [s]
(not (comment? s))) ; you could also do (-> s comment? not), just showing alternatives, but what you had originally is just fine.
(defn remove-comments [file-contents]
(filter not-comment? file-contents))
(defn nil-if-hyphen [s]