aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/OUTFORM.lsp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-06 04:17:00 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-06 04:17:00 +0000
commitf39c8c2ab9bf4ab06fefc09d75bcc95124d0acc1 (patch)
tree86e83ad35a5208b25a6bd0bdfd3e429df7713f7f /src/algebra/strap/OUTFORM.lsp
parent4f5eed96341cffc2c2e783b99cd61dde37570230 (diff)
downloadopen-axiom-f39c8c2ab9bf4ab06fefc09d75bcc95124d0acc1.tar.gz
* interp/compiler.boot (compRepeatOrCollect): Compile list
comprehension to %collect form.
Diffstat (limited to 'src/algebra/strap/OUTFORM.lsp')
-rw-r--r--src/algebra/strap/OUTFORM.lsp25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/algebra/strap/OUTFORM.lsp b/src/algebra/strap/OUTFORM.lsp
index 4a5d4fbc..0e62d8b9 100644
--- a/src/algebra/strap/OUTFORM.lsp
+++ b/src/algebra/strap/OUTFORM.lsp
@@ -638,24 +638,17 @@
(|OUTFORM;rspace;2I$;30| |n| (- |m| 1) $) $))))
(DEFUN |OUTFORM;matrix;L$;31| (|ll| $)
- (PROG (#0=#:G1553 |l| #1=#:G1554 |lv|)
+ (PROG (|lv|)
(RETURN
(SEQ (LETT |lv|
- (PROGN
- (LETT #0# NIL |OUTFORM;matrix;L$;31|)
- (SEQ (LETT |l| NIL |OUTFORM;matrix;L$;31|)
- (LETT #1# |ll| |OUTFORM;matrix;L$;31|) G190
- (COND
- ((OR (ATOM #1#)
- (PROGN
- (LETT |l| (CAR #1#)
- |OUTFORM;matrix;L$;31|)
- NIL))
- (GO G191)))
- (SEQ (EXIT (LETT #0# (CONS (LIST2VEC |l|) #0#)
- |OUTFORM;matrix;L$;31|)))
- (LETT #1# (CDR #1#) |OUTFORM;matrix;L$;31|)
- (GO G190) G191 (EXIT (NREVERSE0 #0#))))
+ (LET ((#0=#:G1554 |ll|) (#1=#:G1553 NIL))
+ (LOOP
+ (COND
+ ((ATOM #0#) (RETURN (NREVERSE #1#)))
+ (T (LET ((|l| (CAR #0#)))
+ (LETT #1# (CONS (LIST2VEC |l|) #1#)
+ |OUTFORM;matrix;L$;31|))))
+ (LETT #0# (CDR #0#) |OUTFORM;matrix;L$;31|)))
|OUTFORM;matrix;L$;31|)
(EXIT (CONS 'MATRIX (LIST2VEC |lv|)))))))