Read a configuration file: Difference between revisions

Content added Content deleted
(New Clojure solution; removed old solution and warning)
m (Comment cleanup)
Line 810: Line 810:


=={{header|Clojure}}==
=={{header|Clojure}}==
Tested with Clojure 1.9.0
<lang clojure>(ns read-conf-file.core
<lang clojure>(ns read-conf-file.core
(:require [clojure.java.io :as io]
(:require [clojure.java.io :as io]
Line 840: Line 839:


(defn mk-conf
(defn mk-conf
"Build configuration map from parsed lines."
"Build configuration map from lines."
[lines]
[lines]
(->> (map parse-line lines)
(->> (map parse-line lines)