Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 deletions

View file

@ -0,0 +1,14 @@
(require '[clojure.data.csv :as csv]
'[clojure.java.io :as io])
(defn add-sum-column [coll]
(let [titles (first coll)
values (rest coll)]
(cons (conj titles "SUM")
(map #(conj % (reduce + (map read-string %))) values))))
(with-open [in-file (io/reader "test_in.csv")]
(doall
(let [out-data (add-sum-column (csv/read-csv in-file))]
(with-open [out-file (io/writer "test_out.csv")]
(csv/write-csv out-file out-data)))))