Browse Source

Use a much cleaner version

Samuel W. Flint 8 years ago
parent
commit
07c5078f9b
1 changed files with 5 additions and 10 deletions
  1. 5 10
      derive2.lisp

+ 5 - 10
derive2.lisp

@@ -45,16 +45,11 @@
        ',name)))
 
 (defun get-expansion (expression)
-  (first
-   (remove-if #'null
-              (map 'list
-                #'(lambda (nte)
-                    (let ((test (second nte))
-                          (expander (third nte)))
-                      (if (apply test expression)
-                          expander
-                          nil)))
-                *rules*))))
+  (second (first
+           (remove-if-not #'(lambda (nte)
+                              (let ((test (second nte)))
+                                (apply test expression)))
+                          *rules*))))
 
 (defun derive (function)
   (declare (cons function))