Wave 4: add sequences/vectors/files chapters, 23 exercises, quiz3, finish ceremony, PCL table

This commit is contained in:
venomade committed 2026-11-22 11:15:35 +00:00
1 parent 77843402fa
commit 4675bd1106
76 files changed
+2505 -14

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
;;; FILES 3: PRINTING TO STREAMS (solution)
(defun two-views (x)
(with-output-to-string (s)
(prin1 x s)
(princ " " s)
(princ x s)))
(defun name-tag (name)
(with-output-to-string (s)
(print "name:" s)
(princ name s)))
;;; ------------------------------------------------------------------
;;; Checks. Read them - they tell you what to aim for - but leave
;;; them unchanged.
;;; ------------------------------------------------------------------
(check-equal "\"hi\" hi" (two-views "hi"))
(check-equal "7 7" (two-views 7))
(check-equal "
\"name:\" ada" (name-tag "ada"))