aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2022/day-02/day-02.ipynb8
1 files changed, 3 insertions, 5 deletions
diff --git a/2022/day-02/day-02.ipynb b/2022/day-02/day-02.ipynb
index 715f14b..d9dcd72 100644
--- a/2022/day-02/day-02.ipynb
+++ b/2022/day-02/day-02.ipynb
@@ -74,11 +74,9 @@
"(define losing-rounds {'rock 'scissors 'paper 'rock 'scissors 'paper})\n",
"\n",
"(define (outcome them me)\n",
- " (match (cons them me)\n",
- " [(cons x x) 'draw]\n",
- " [(cons x y)\n",
- " #:when (eq? y (winning-rounds x))\n",
- " 'win]\n",
+ " (match* (them me)\n",
+ " [(x x) 'draw]\n",
+ " [(x y) #:when (eq? y (winning-rounds x)) 'win]\n",
" [_ 'lose]))"
]
},