function parameters
both optional and keyword parameters can include both default value AND 'providedp' predicate of whether they were provided
This commit is contained in:
@@ -111,14 +111,20 @@
|
||||
(gethash "two" hash-table-2) "zwei")
|
||||
(assert-false (equalp hash-table-1 hash-table-2))
|
||||
;; Change the first hash table to be EQUALP to the second one.
|
||||
(setf (gethash ____ hash-table-1) ____
|
||||
(gethash ____ hash-table-1) ____)
|
||||
(setf (gethash "one" hash-table-1) "eins"
|
||||
(gethash "two" hash-table-1) "zwei")
|
||||
(assert-true (equalp hash-table-1 hash-table-2))))
|
||||
|
||||
;; (setf colors (make-hash-table :test #'equalp))
|
||||
(define-test make-your-own-hash-table
|
||||
;; Make your own hash table that satisfies the test.
|
||||
(let ((colors ____))
|
||||
(let ((colors (make-hash-table :test #'equalp)))
|
||||
;; You will need to modify your hash table after you create it.
|
||||
(setf (gethash "blue" colors) 1)
|
||||
(setf (gethash "blue" colors) '(0 0 1)
|
||||
(gethash "green" colors) '(0 1 0)
|
||||
(gethash "red" colors) '(1 0 0)
|
||||
(gethash "color-efim" colors) '(9 9 9))
|
||||
____
|
||||
(assert-equal (hash-table-count colors) 4)
|
||||
(let ((values (list (gethash "blue" colors)
|
||||
|
||||
Reference in New Issue
Block a user