indentation
This commit is contained in:
@@ -63,10 +63,10 @@
|
||||
(lambda (child)
|
||||
(let [(is-big (is-big? child))]
|
||||
(when (and (not (string=? child "start"))
|
||||
(or is-big
|
||||
(< (count-members child path) max-small)))
|
||||
(or is-big
|
||||
(< (count-members child path) max-small)))
|
||||
(visit child (cons node path)
|
||||
(if (and (not is-big) (member child path)) 1 max-small)))))
|
||||
(if (and (not is-big) (member child path)) 1 max-small)))))
|
||||
(hashtable-ref graph node '())))))
|
||||
|
||||
; computes how many possible paths there are in graph
|
||||
@@ -103,6 +103,6 @@
|
||||
(lambda (file)
|
||||
(let [(graph (make-graph file))]
|
||||
(printf "part 1:~% ~a paths with at most 1 visit to small caves.~%"
|
||||
(count-paths graph 1))
|
||||
(count-paths graph 1))
|
||||
(printf "part 2:~% ~a paths with at most 2 visits to small caves.~%"
|
||||
(count-paths graph 2)))))
|
||||
(count-paths graph 2)))))
|
||||
|
||||
Reference in New Issue
Block a user