projects
/
adventofcode2019.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix day10pt1 and add correct day10pt2
[adventofcode2019.git]
/
src
/
adventofcode2019
/
lib.clj
diff --git
a/src/adventofcode2019/lib.clj
b/src/adventofcode2019/lib.clj
index 2699439f649085f7769e1b9154858ebd8e09f7d9..d992475caf866b9d7f992668c6bba59ec390ab53 100644
(file)
--- a/
src/adventofcode2019/lib.clj
+++ b/
src/adventofcode2019/lib.clj
@@
-16,6
+16,10
@@
(let [bottom-ns (last (str/split (str *ns*) #"\."))]
(str "resources/" bottom-ns)))
+(defn manhattan-distance [[ax ay] [bx by]]
+ (+ (Math/abs (- ax bx))
+ (Math/abs (- ay by))))
+
(def part1
#(println (str "Part 1: " %)))
(def part2