aboutsummaryrefslogtreecommitdiffstats
path: root/day8/part1.clj
blob: fe06fdff604d61b0621ba32cd3bacdce6a557c7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(require '[clojure.string :as str])

(->> (str/split-lines (slurp "./in"))
     (map
       (fn [line]
         (as-> line $
           (str/split $ #" ")
           (subvec $ 11 15)
           (filter #(.contains [2 3 4 7] (count %)) $)
           (count $)
           )))
     (apply +)
     (println)
     )