/[slime]/slime/swank.lisp
ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.320 by eweitz, Tue Aug 9 13:56:54 2005 UTC revision 1.321 by eweitz, Wed Aug 10 00:21:57 2005 UTC
# Line 2566  If the rows are of unequal length, trunc Line 2566  If the rows are of unequal length, trunc
2566  For example:  For example:
2567  \(transpose-lists '((ONE TWO THREE) (1 2)))  \(transpose-lists '((ONE TWO THREE) (1 2)))
2568    => ((ONE 1) (TWO 2))"    => ((ONE 1) (TWO 2))"
2569    (catch 'done    (cond ((some #'null lists) '())
2570      (loop with result          (t (cons (mapcar #'car lists)
2571            with collectors = (loop for list in lists                   (transpose-lists (mapcar #'cdr 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))))  
2572    
2573    
2574  ;;;;; Completion Tests  ;;;;; Completion Tests

Legend:
Removed from v.1.320  
changed lines
  Added in v.1.321

  ViewVC Help
Powered by ViewVC 1.1.5