 (require '[clojure.data.json :as json])
-(def input (json/read-str (slurp "input.txt")))
 
 (defn seqsum 
   "Returns the sum of all numbers in a sequence"

    (+ numsum ssum msum)))

(defn mapsum
  [m]
  (+ (seqsum (keys m))
     (seqsum (vals m))))

(defn filter-by-val
  [v m]
  (cond
    (sequential? m) (map #(filter-by-val v %) m)
    (map? m)

             m)))
    :else m))

(def input (json/read-str (slurp "input.txt")))
(println "part 1: " (mapsum input))
(println "part 2: " (mapsum (filter-by-val "red" input)))
