diff options
Diffstat (limited to '2022/day-02')
-rw-r--r-- | 2022/day-02/day-02.ipynb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/2022/day-02/day-02.ipynb b/2022/day-02/day-02.ipynb index 4423c55..715f14b 100644 --- a/2022/day-02/day-02.ipynb +++ b/2022/day-02/day-02.ipynb @@ -76,8 +76,10 @@ "(define (outcome them me)\n", " (match (cons them me)\n", " [(cons x x) 'draw]\n", - " [(cons x y) #:when (eq? y (winning-rounds x)) 'win]\n", - " [_ 'lose]))\n" + " [(cons x y)\n", + " #:when (eq? y (winning-rounds x))\n", + " 'win]\n", + " [_ 'lose]))" ] }, { @@ -118,7 +120,7 @@ "(for/sum ([play (in-list strategy-guide)])\n", " (match-define (list them me) (string-split play))\n", " (+ (score-bonus (outcome (assume-throw them) (assume-throw me)))\n", - " (score-bonus (assume-throw me))))\n" + " (score-bonus (assume-throw me))))" ] }, { @@ -163,7 +165,7 @@ "(for/sum ([play (in-list strategy-guide)])\n", " (match-define (list them result) (string-split play))\n", " (+ (score-bonus (assume-result result))\n", - " (score-bonus (pick-throw (assume-result them) (assume-result result)))))\n" + " (score-bonus (pick-throw (assume-result them) (assume-result result)))))" ] } ], |