9 Aug
2005
9 Aug
'05
4:05 p.m.
[Look at what Gnus made out of your email address. Strange...] On Tue, 09 Aug 2005 17:18:52 +0200, Helmut@agharta.de, Eller@agharta.de, <heller@common-lisp.net> wrote:
Uugh, how ugly :-)
How about?
(defun transpose-lists (lists) (cond ((some #'null lists) '()) (t (cons (mapcar #'car lists) (transpose-lists (mapcar #'cdr lists))))))
Ugh, how nice... :) Damn, I knew there was a recursive solution lurking in there. My only excuse is that my version seems to be about twice as fast on CMUCL and LispWorks. Call it premature optimization... :) Cheers, Edi.