Commit 06b91a01 authored by Nikodemus Siivola's avatar Nikodemus Siivola
Browse files

fix MAKE-GENSYM-LIST when called without the second argument

 * plus a test-case
parent 64a631d9
......@@ -33,7 +33,7 @@ PACKAGE."
"Interns the string designated by NAME in the KEYWORD package."
(intern (string name) :keyword))
(defun make-gensym-list (length &optional x)
(defun make-gensym-list (length &optional (x "G"))
"Returns a list of LENGTH gensyms, each generated with a call to
GENSYM using (if provided) as the argument."
(loop repeat length
......
......@@ -1226,6 +1226,14 @@
(mapcar 'symbol-name syms)))))
(nil t))
(deftest make-gensym-list.2
(let ((*gensym-counter* 0))
(let ((syms (make-gensym-list 3)))
(list (find-if 'symbol-package syms)
(equal '("G0" "G1" "G2")
(mapcar 'symbol-name syms)))))
(nil t))
;;;; Type-system
(deftest of-type.1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment