franz newline
This commit is contained in:
parent
f88a28cad2
commit
d55ca4c019
@ -7,14 +7,11 @@
|
||||
(partial re-seq #"[a-z]{3}")))
|
||||
(into {})))
|
||||
|
||||
(def count-paths
|
||||
(memoize
|
||||
(fn [start target]
|
||||
(let [edges (input start)]
|
||||
(if (contains? edges target)
|
||||
1
|
||||
(apply + (map #(count-paths % target) edges)))))))
|
||||
|
||||
(def count-paths (memoize (fn [start target]
|
||||
(let [edges (input start)]
|
||||
(if (contains? edges target)
|
||||
1
|
||||
(apply + (map #(count-paths % target) edges)))))))
|
||||
|
||||
;; part 1
|
||||
(count-paths "you" "out")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user