replacement in 2023/day1.lisp at line 2
− (:documentation "Process a character from the input."))
+ (:documentation "Process a character from the input."))
replacement in 2023/day1.lisp at line 5
− (:documentation "Determine whether or not a \"digit\" has been found."))
+ (:documentation "Determine whether or not a \"digit\" has been found."))
replacement in 2023/day1.lisp at line 8
− ((current-digit :initform nil)))
+ ((current-digit :initform nil)))
replacement in 2023/day1.lisp at line 11
− (setf (slot-value accumulator 'current-digit) (digit-char-p value)))
+ (setf (slot-value accumulator 'current-digit) (digit-char-p value)))
replacement in 2023/day1.lisp at line 14
− (slot-value accumulator 'current-digit))
+ (slot-value accumulator 'current-digit))
replacement in 2023/day1.lisp at line 17
− ((matching :initform nil)))
+ ((matching :initform nil)))
replacement in 2023/day1.lisp at line 22
− '("one" "two" "three" "four" "five"
− "six" "seven" "eight" "nine" "ten")))
− (loop
− for n from 1 to 9
− collect (append (coerce (format nil "~a" n) 'list) n))))
+ '("one" "two" "three" "four" "five"
+ "six" "seven" "eight" "nine" "ten")))
+ (loop
+ for n from 1 to 9
+ collect (append (coerce (format nil "~a" n) 'list) n))))
replacement in 2023/day1.lisp at line 30
[2.989]→[2.989:1189](∅→∅) − (mapcan
− #'(lambda (entry)
− (if (and (consp entry) (equal value (car entry)))
− (list (cdr entry))))
− (append (slot-value accumulator 'matching) english-numbers))))
+ (mapcan
+ #'(lambda (entry)
+ (if (and (consp entry) (equal value (car entry)))
+ (list (cdr entry))))
+ (append (slot-value accumulator 'matching) english-numbers))))
replacement in 2023/day1.lisp at line 37
[2.1242]→[2.1242:1339](∅→∅) − (dolist (entry (slot-value accumulator 'matching))
− (if (numberp entry)
− (return entry))))
+ (dolist (entry (slot-value accumulator 'matching))
+ (if (numberp entry)
+ (return entry))))
replacement in 2023/day1.lisp at line 42
[3.327]→[2.1341:1367](∅→∅) replacement in 2023/day1.lisp at line 45
[2.1396]→[2.1396:1520](∅→∅) − (list 'accumulator (make-instance which)'low () 'high ()))
− '(digit-accumulator english-accumulator))))
+ (list 'accumulator (make-instance which)'low () 'high ()))
+ '(digit-accumulator english-accumulator))))
replacement in 2023/day1.lisp at line 49
[2.1579]→[2.1579:1687](∅→∅) − (push-char (getf ac 'accumulator) c)
− (let ((digit (peek (getf ac 'accumulator))))
+ (push-char (getf ac 'accumulator) c)
+ (let ((digit (peek (getf ac 'accumulator))))
replacement in 2023/day1.lisp at line 61
[2.2029]→[2.2029:2051](∅→∅) replacement in 2023/day1.lisp at line 67
[2.2216]→[2.2216:2288](∅→∅) − (setf p1 (+ p1 p1-1))
− (setf p2 (+ p2 p2-1))))
+ (setf p1 (+ p1 p1-1))
+ (setf p2 (+ p2 p2-1))))
replacement in 2023/day1.lisp at line 73
[2.2395]→[2.2395:2523](∅→∅) − (loop for result in (process s)
− for part from 1
− do (format T "Part ~a: ~a~%" part result))))
+ (loop for result in (process s)
+ for part from 1
+ do (format T "Part ~a: ~a~%" part result))))