indentation

This commit is contained in:
2021-12-12 20:37:37 +01:00
parent 6a0df03604
commit ea9e5b7167

View File

@@ -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)))))