From 1346f932d86970a0836a00ef2c1eed56eeef6df3 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 31 Dec 2015 11:07:57 -0800 Subject: [PATCH] update --- day6.scrbl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day6.scrbl b/day6.scrbl index 14a0149..9ace0b7 100644 --- a/day6.scrbl +++ b/day6.scrbl @@ -28,8 +28,8 @@ Each instruction consists of two pieces. First, an operation: either @italic{tu (define (action->bulb-func action) (case action - [("turn off") (thunk* 0)] [("turn on") (thunk* 1)] + [("turn off") (thunk* 0)] [else (λ(bulb) (if (= bulb 1) 0 1))])) (list* (action->bulb-func (string-trim action)) @@ -115,8 +115,8 @@ Since the only part that changes between the solutions is the bulb functions, we (define q1-bulb-func-converter (λ(action) (case action - [("turn off") (thunk* 0)] [("turn on") (thunk* 1)] + [("turn off") (thunk* 0)] [else (λ(bulb) (if (= bulb 1) 0 1))]))) (define q2-bulb-func-converter