Wave 4: add sequences/vectors/files chapters, 23 exercises, quiz3, finish ceremony, PCL table
This commit is contained in:
1 parent
77843402fa
commit
4675bd1106
76 files changed
+2505
-14
No files matched your search
@@ -0,0 +1,23 @@
|
||||
;;; PREDICATES 4: EQL AND EQUALP (solution)
|
||||
|
||||
(defun same-exact-p (a b)
|
||||
(eql a b))
|
||||
|
||||
(defun same-amount-p (a b)
|
||||
(equalp a b))
|
||||
|
||||
(defun same-twin-p (a b)
|
||||
(equalp a b))
|
||||
|
||||
;;; ------------------------------------------------------------------
|
||||
;;; Checks. Read them - they tell you what to aim for - but leave
|
||||
;;; them unchanged.
|
||||
;;; ------------------------------------------------------------------
|
||||
|
||||
(check (same-exact-p 7 7))
|
||||
(check (not (same-exact-p 1 1.0)))
|
||||
(check (not (same-exact-p 1 2)))
|
||||
(check (same-amount-p 1 1.0))
|
||||
(check (not (same-amount-p 1 2)))
|
||||
(check (same-twin-p #\a #\A))
|
||||
(check (not (same-twin-p #\a #\b)))
|
||||
Reference in new issue
Block a user