aboutsummaryrefslogtreecommitdiff
path: root/2022/day-02
diff options
context:
space:
mode:
authorHunky Jimpjorps <thechairman@thechairman.info>2022-12-02 11:44:47 -0500
committerHunky Jimpjorps <thechairman@thechairman.info>2022-12-02 11:44:47 -0500
commitc3d257ba97ffbee320c8fbdc9a90bf2a5e859d61 (patch)
tree4ec4f8e65245a4b76b1721466848271877a8649e /2022/day-02
parent3b19a598d9c5e4e45289438f18174ae7dee190fb (diff)
downloadgleam_aoc-c3d257ba97ffbee320c8fbdc9a90bf2a5e859d61.tar.gz
gleam_aoc-c3d257ba97ffbee320c8fbdc9a90bf2a5e859d61.zip
day 2 markdown fixes
Diffstat (limited to '2022/day-02')
-rw-r--r--2022/day-02/day-02.ipynb10
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)))))"
]
}
],