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))