Add LIST, SEQUENCE to TYPECASE.
[jscl.git] / src / boot.lisp
index f5fd74e..d233b93 100644 (file)
@@ -22,6 +22,8 @@
 ;;; Lisp world from scratch. This code has to define enough language
 ;;; to the compiler to be able to run.
 
+(/debug "loading boot.lisp!")
+
 (eval-when-compile
   (let ((defmacro-macroexpander
          '#'(lambda (form)
        (cond
          ,@(mapcar (lambda (c)
                      (if (eq (car c) t)
-                         `((t ,@(rest c)))
+                         `(t ,@(rest c))
                          `((,(ecase (car c)
                                     (integer 'integerp)
                                     (cons 'consp)
+                                    (list 'listp)
+                                    (sequence 'sequencep)
                                     (symbol 'symbolp)
                                     (function 'functionp)
                                     (float 'floatp)
 
 (defun error (fmt &rest args)
   (%throw (apply #'format nil fmt args)))
+
+(defmacro nth-value (n form)
+  `(multiple-value-call (lambda (&rest values)
+                          (nth ,n values))
+     ,form))