summaryrefslogtreecommitdiff
path: root/Sacla/do.lisp
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-03 13:26:22 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-03 13:26:22 +0200
commit7c9daef5037fef49b3bd522cd4a78cdeda0c2055 (patch)
tree37c46e241b608a7ee8fa725df09864742e43e1a6 /Sacla/do.lisp
parentbf7021f60ed3bdc3f1a3f281fa57a1566141a67d (diff)
Add EQL, DO, DO*, DOTIMES, and DOLIST from Sacla.
Diffstat (limited to 'Sacla/do.lisp')
-rw-r--r--Sacla/do.lisp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Sacla/do.lisp b/Sacla/do.lisp
index 6b7d3fd..77afbf7 100644
--- a/Sacla/do.lisp
+++ b/Sacla/do.lisp
@@ -35,7 +35,9 @@
(setq-operator (if parallel-p 'psetq 'setq)))
(multiple-value-bind (declarations forms) (declarations-and-forms body)
`(block nil
- (,let-operator (,@(mapcar #'(lambda (x) (if (atom x) x (subseq x 0 2)))
+ (,let-operator (,@(mapcar #'(lambda (x) (if (atom x)
+ x
+ (list (first x) (second x))))
var-init-step-list))
,@declarations
(tagbody
@@ -43,7 +45,8 @@
(when ,test-form (return (progn ,@result-forms)))
,@forms
(,setq-operator ,@(mapcan #'(lambda (x)
- (when (and (consp x) (= (length x) 3))
+ (when (and (consp x)
+ (= (length x) 3))
`(,(first x) ,(third x))))
var-init-step-list))
(go ,top)))))))