X-Git-Url: http://git.jkinsey.net/?p=adventofcode2019.git;a=blobdiff_plain;f=src%2Fadventofcode2019%2Flib.clj;fp=src%2Fadventofcode2019%2Flib.clj;h=d992475caf866b9d7f992668c6bba59ec390ab53;hp=2699439f649085f7769e1b9154858ebd8e09f7d9;hb=f1a195aa5c74e264f1aa82aea8556d0501b5abf7;hpb=3abd704601d32cd69d62242e8c37c186a732a9c7 diff --git a/src/adventofcode2019/lib.clj b/src/adventofcode2019/lib.clj index 2699439..d992475 100644 --- 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