aboutsummaryrefslogtreecommitdiff
path: root/advent-of-code/2023/08/1.rkt
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2024-02-24 23:07:57 +0800
committerMistivia <i@mistivia.com>2024-02-24 23:12:21 +0800
commitfc4ec74e50ba362af054dca79d79dd4b7853ea5b (patch)
treeb3c54344bc99d53d3040869e9ee80c3184e16ade /advent-of-code/2023/08/1.rkt
parent5898fa29a56f699bebb4644188348840b26207d9 (diff)
reformat code
Diffstat (limited to 'advent-of-code/2023/08/1.rkt')
-rw-r--r--advent-of-code/2023/08/1.rkt18
1 files changed, 9 insertions, 9 deletions
diff --git a/advent-of-code/2023/08/1.rkt b/advent-of-code/2023/08/1.rkt
index 3db9ccd..81424a1 100644
--- a/advent-of-code/2023/08/1.rkt
+++ b/advent-of-code/2023/08/1.rkt
@@ -34,14 +34,14 @@
(define (simulate start end)
(let loop ((i 0) (cur start))
(if (string=? cur end)
- i
- (let ()
- (define instruction (next-instruction))
- (define mapping (hash-ref the-map cur))
- (define next
- (if (char=? instruction #\L)
- (car mapping)
- (cadr mapping)))
- (loop (+ 1 i) next)))))
+ i
+ (let ()
+ (define instruction (next-instruction))
+ (define mapping (hash-ref the-map cur))
+ (define next
+ (if (char=? instruction #\L)
+ (car mapping)
+ (cadr mapping)))
+ (loop (+ 1 i) next)))))
(simulate "AAA" "ZZZ") \ No newline at end of file