This file contains hidden or 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 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] |