Replace advanced etypecase by cond
authorDavid Vázquez <davazp@gmail.com>
Sun, 5 May 2013 15:34:34 +0000 (16:34 +0100)
committerDavid Vázquez <davazp@gmail.com>
Sun, 5 May 2013 15:34:34 +0000 (16:34 +0100)
src/lambda-list.lisp

index 13aee25..1b62075 100644 (file)
                ;; symbol it will be bound to the form. The variable
                ;; where the form is bound is returned.
                (compute-pbindings (pattern form)
-                 (etypecase pattern
-                   (null)
-                   ;; Bind the symbol to FORM. 
-                   (symbol
+                 (cond
+                   ((null pattern))
+                   ;; Bind the symbol to FORM.
+                   ((symbolp pattern)
                     (push `(,pattern ,form) bindings)
                     (values pattern))
-                   ;; Bind FORM to a auxiliar variable and bind
-                   ;; pattern agains it recursively.
-                   (d-lambda-list
+                   ((d-lambda-list-p pattern)
+                    ;; Bind FORM to a auxiliar variable and bind
+                    ;; pattern agains it recursively.
                     (let ((subpart (gensym)))
                       (push `(,subpart
                               (progn