1 (ns adventofcode2019.lib
2 [:require [clojure.string :as str]
3 [clojure.java.io :as io]])
5 (defn get-list-from-file
7 (str/split-lines (str/trim (slurp file-name))))
8 ([file-name split-regex]
9 (str/split (str/trim (slurp file-name)) split-regex)))
11 (defmacro input-file []
12 (let [bottom-ns (last (str/split (str *ns*) #"\."))]
13 (str "resources/" bottom-ns)))
16 #(Integer/parseInt %))