[movitz-cvs] CVS movitz/losp/muerte

ffjeld ffjeld at common-lisp.net
Tue May 2 17:12:20 UTC 2006


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory clnet:/tmp/cvs-serv24627

Modified Files:
	cons.lisp 
Log Message:
Minor tweaks to sublis and nsublis.


--- /project/movitz/cvsroot/movitz/losp/muerte/cons.lisp	2006/04/30 21:38:40	1.13
+++ /project/movitz/cvsroot/movitz/losp/muerte/cons.lisp	2006/05/02 17:12:20	1.14
@@ -9,7 +9,7 @@
 ;;;; Created at:    Fri Dec  8 15:25:45 2000
 ;;;; Distribution:  See the accompanying file COPYING.
 ;;;;                
-;;;; $Id: cons.lisp,v 1.13 2006/04/30 21:38:40 ffjeld Exp $
+;;;; $Id: cons.lisp,v 1.14 2006/05/02 17:12:20 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -294,18 +294,18 @@
 			      (cons car cdr))))))))
       (s tree))))
 
-(defun nsublis (alist tree &key key (test #'eql) (test-not nil notp))
+(defun nsublis (alist tree &key key (test #'eql) test-not)
   "Substitutes new for subtrees matching old."
   (declare (inline assoc))
   (let ((key (or key 'identity))
 	(test (if test-not (complement test-not) test))
 	(temp))
     (labels ((s (subtree)
-	       (cond ((Setq temp (nsublis-macro))
+	       (cond ((setq temp (assoc (funcall key subtree) alist :test test))
 		      (cdr temp))
 		     ((atom subtree) subtree)
 		     (t (do* ((last nil subtree)
-			      (subtree subtree (Cdr subtree)))
+			      (subtree subtree (cdr subtree)))
 			    ((atom subtree)
 			     (if (setq temp (assoc (funcall key subtree) alist :test test))
 				 (setf (cdr last) (cdr temp))))




More information about the Movitz-cvs mailing list