[movitz-cvs] CVS movitz/losp/muerte
ffjeld
ffjeld at common-lisp.net
Sat Mar 15 20:58:19 UTC 2008
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory clnet:/tmp/cvs-serv3576
Modified Files:
sequences.lisp
Log Message:
Have macros in the run-time.
--- /project/movitz/cvsroot/movitz/losp/muerte/sequences.lisp 2007/04/07 20:14:45 1.37
+++ /project/movitz/cvsroot/movitz/losp/muerte/sequences.lisp 2008/03/15 20:58:17 1.38
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Tue Sep 11 14:19:23 2001
;;;;
-;;;; $Id: sequences.lisp,v 1.37 2007/04/07 20:14:45 ffjeld Exp $
+;;;; $Id: sequences.lisp,v 1.38 2008/03/15 20:58:17 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -46,11 +46,13 @@
(defmacro sequence-double-dispatch ((seq0 seq1) &rest clauses)
`(case (logior (if (typep ,seq0 'list) 2 0)
(if (typep ,seq1 'list) 1 0))
- ,@(loop for ((type0 type1) . forms) in clauses
- as index = (logior (ecase type0 (list 2) (vector 0))
- (ecase type1 (list 1) (vector 0)))
- collect
- `(,index , at forms))
+ ,@(mapcar (lambda (clause)
+ (destructuring-bind ((type0 type1) . forms)
+ clause
+ (list* (logior (ecase type0 (list 2) (vector 0))
+ (ecase type1 (list 1) (vector 0)))
+ forms)))
+ clauses)
(t (sequence-double-dispatch-error ,seq0 ,seq1))))
(defun length (sequence)
More information about the Movitz-cvs
mailing list