From 9810345db98b338301c455cf0a20f0bbd22772ba Mon Sep 17 00:00:00 2001 From: cow Date: Tue, 6 Dec 2022 02:57:58 -0500 Subject: [PATCH] forgot cadr exists!! --- elisp/day-2/solution.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/elisp/day-2/solution.el b/elisp/day-2/solution.el index 763736c..3f4373c 100755 --- a/elisp/day-2/solution.el +++ b/elisp/day-2/solution.el @@ -92,8 +92,8 @@ (string-split s " " t)) input))) (seq-reduce (lambda (acc row) - (let* ((their-shape (cdr (assoc (nth 0 row) solution-opponent-letter-to-shape-alist))) - (our-shape (cdr (assoc (nth 1 row) solution-player-letter-to-shape-alist))) + (let* ((their-shape (cdr (assoc (car row) solution-opponent-letter-to-shape-alist))) + (our-shape (cdr (assoc (cadr row) solution-player-letter-to-shape-alist))) (outcome (solution-decide-game our-shape their-shape))) (+ acc (cdr (assoc our-shape solution-shape-score-alist)) @@ -106,8 +106,8 @@ (string-split s " " t)) input))) (seq-reduce (lambda (acc row) - (let* ((their-shape (cdr (assoc (nth 0 row) solution-opponent-letter-to-shape-alist))) - (desired-outcome (cdr (assoc (nth 1 row) solution-player-letter-to-outcome-alist))) + (let* ((their-shape (cdr (assoc (car row) solution-opponent-letter-to-shape-alist))) + (desired-outcome (cdr (assoc (cadr row) solution-player-letter-to-outcome-alist))) (our-shape (solution-shape-for-outcome their-shape desired-outcome))) (+ acc (cdr (assoc our-shape solution-shape-score-alist))