mirror of
https://github.com/Ajetski/advent-of-code.git
synced 2025-09-30 11:23:17 -09:00
rename input
This commit is contained in:
parent
4e7d3a5893
commit
6ac09bd75a
@ -3,10 +3,10 @@
|
||||
day01 (:require [core :refer [get-puzzle-input]]
|
||||
[clojure.string :as string]))
|
||||
|
||||
(def input (get-puzzle-input 1))
|
||||
(def lines (get-puzzle-input 1))
|
||||
|
||||
;; part 1
|
||||
(->> input
|
||||
(->> lines
|
||||
(map #(Integer/parseInt
|
||||
(str (re-find #"\d" %)
|
||||
(re-find #"\d" (string/reverse %)))))
|
||||
@ -29,7 +29,7 @@
|
||||
(def last-num-pattern (generate-regex-pattern string/reverse))
|
||||
|
||||
;; part 2
|
||||
(->> input
|
||||
(->> lines
|
||||
(map #(Integer/parseInt
|
||||
(str (numeric-value (re-find first-num-pattern %))
|
||||
(numeric-value (string/reverse
|
||||
|
Loading…
x
Reference in New Issue
Block a user