[slime-cvs] CVS update: slime/ChangeLog slime/swank.lisp

Edi Weitz eweitz at common-lisp.net
Wed Aug 10 00:21:59 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv11166

Modified Files:
	ChangeLog swank.lisp 
Log Message:
Helmut's version is much nicer...

Date: Wed Aug 10 02:21:58 2005
Author: eweitz

Index: slime/ChangeLog
diff -u slime/ChangeLog:1.737 slime/ChangeLog:1.738
--- slime/ChangeLog:1.737	Tue Aug  9 21:35:25 2005
+++ slime/ChangeLog	Wed Aug 10 02:21:57 2005
@@ -1,3 +1,8 @@
+2005-08-10  Edi Weitz  <edi at agharta.de>
+
+	* swank.lisp (transpose-lists): Replaced with much nicer function
+	by Helmut Eller.
+
 2005-08-09  Matthias Koeppe  <mkoeppe at mail.math.uni-magdeburg.de>
 
 	* slime.el (slime-read-object): Handle ids that are conses.


Index: slime/swank.lisp
diff -u slime/swank.lisp:1.320 slime/swank.lisp:1.321
--- slime/swank.lisp:1.320	Tue Aug  9 15:56:54 2005
+++ slime/swank.lisp	Wed Aug 10 02:21:57 2005
@@ -2566,17 +2566,9 @@
 For example:
 \(transpose-lists '((ONE TWO THREE) (1 2)))
   => ((ONE 1) (TWO 2))"
-  (catch 'done
-    (loop with result
-          with collectors = (loop for list in lists
-                                  collect (let ((list list))
-                                            (lambda ()
-                                              (cond ((null list)
-                                                     (throw 'done result))
-                                                    (t (pop list))))))
-          collect (loop for collector in collectors
-                        collect (funcall collector)) into temp-result
-          do (setq result temp-result))))
+  (cond ((some #'null lists) '())
+        (t (cons (mapcar #'car lists)
+                 (transpose-lists (mapcar #'cdr lists))))))
 
 
 ;;;;; Completion Tests




More information about the slime-cvs mailing list