From e48ca63881d5d002df4a89ae3c955104a98ad450 Mon Sep 17 00:00:00 2001 From: Alan Daniels Date: Mon, 8 Dec 2025 22:04:58 +1100 Subject: [PATCH] fmt fmt --- 03b.lisp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/03b.lisp b/03b.lisp index c9cab7b..799effc 100644 --- a/03b.lisp +++ b/03b.lisp @@ -20,18 +20,14 @@ (cl-heap:enqueue *queue* (list "" bank depth) 0) (loop do (defparameter *candidate* (apply #'bank-max-joltage-step (cl-heap:dequeue *queue*))) - when (integerp *candidate*) - do (return *candidate*) + when (integerp *candidate*) do (return *candidate*) do (loop for branch in (reverse *candidate*) - do (cl-heap:enqueue *queue* (cdr branch) (car branch))) - ) - ) + do (cl-heap:enqueue *queue* (cdr branch) (car branch))))) (bank-max-joltage "234234234234278" 2) (bank-max-joltage "234234234234278" 12) (defun bank-max-joltage12 (bank) - (bank-max-joltage bank 12) - ) + (bank-max-joltage bank 12)) (defun array-total-joltage (bank-list depth) (reduce #'+ (mapcar #'bank-max-joltage12 bank-list)))