Fix 16 mid-chapter exercise defects (scouts mid1+mid2)

Verified: dev/verify.sh all 70 exercises green (broken fail, solved pass).
This commit is contained in:
venomade committed 2026-11-22 04:52:35 +00:00
1 parent 2735c8dca5
commit 6e2c382c78
24 files changed
+34 -15

No files matched your search

+2
View File
@@ -3,6 +3,8 @@
;;; MAPCAR applies a function to each element and collects the
;;; results into a new list:
;;; (mapcar #'1+ '(1 2 3)) => (2 3 4)
;;; Uppercase a string with STRING-UPCASE: (string-upcase "ada")
;;; => "ADA" (chapter 09 digs in).
;; TODO: Every element of XS, doubled.
(defun double-all (xs)
+1
View File
@@ -3,6 +3,7 @@
;;; FUNCALL spells the arguments out; APPLY takes the last of them
;;; from a list:
;;; (apply #'+ 1 2 '(3 4)) => 10
;;; MAX returns the largest of its arguments: (max 1 5 2) => 5
;; TODO: Add up all of XS, using APPLY.
(defun sum-of (xs)
+1
View File
@@ -19,6 +19,7 @@
(check-equal 4 (biggest '(3 1 4)))
(check-equal 2 (biggest '(2)))
(check-equal 9 (biggest '(1 9 2)))
(check-equal 6 (product '(1 2 3)))
(check-equal 7 (product '(7)))
(check-equal 1 (product '()))