From 48fd41b4a011d04634830c9132cf137d33ad555a Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Mon, 5 Dec 2022 15:08:51 +0100 Subject: cleanups --- AoC2022/05/solver.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'AoC2022/05/solver.el') diff --git a/AoC2022/05/solver.el b/AoC2022/05/solver.el index edcd7cc..ed42bb2 100644 --- a/AoC2022/05/solver.el +++ b/AoC2022/05/solver.el @@ -23,7 +23,7 @@ (stacks (make-vector stacks-len nil)) next) (while (setq next (search-backward "]" nil t)) - (push (intern (string (char-before))) + (push (char-before) (aref stacks (/ (- next (line-beginning-position) 1) 4)))) stacks)) @@ -52,12 +52,12 @@ (thread-last (solver-build-stacks) (solver-apply-moves execution) - (seq-map #'car)))) + (cl-map 'string #'car)))) (ert-deftest solver-solutions () - (should (equal '(T P G V Q P F D H) + (should (equal "TPGVQPFDH" (solver #'solver-single-move!))) - (should (equal '(D M R D F R H H H) + (should (equal "DMRDFRHHH" (solver #'solver-bulk-move!)))) -- cgit v1.2.3