From f39c8c2ab9bf4ab06fefc09d75bcc95124d0acc1 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 6 Jun 2010 04:17:00 +0000 Subject: * interp/compiler.boot (compRepeatOrCollect): Compile list comprehension to %collect form. --- src/algebra/strap/LNAGG-.lsp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/algebra/strap/LNAGG-.lsp') diff --git a/src/algebra/strap/LNAGG-.lsp b/src/algebra/strap/LNAGG-.lsp index 52fa1610..9051a7b1 100644 --- a/src/algebra/strap/LNAGG-.lsp +++ b/src/algebra/strap/LNAGG-.lsp @@ -21,18 +21,16 @@ |LNAGG-;maxIndex;AI;6|)) (DEFUN |LNAGG-;indices;AL;1| (|a| $) - (PROG (#0=#:G1411 |i| #1=#:G1412) + (PROG () (RETURN - (SEQ (PROGN - (LETT #0# NIL |LNAGG-;indices;AL;1|) - (SEQ (LETT |i| (SPADCALL |a| (|getShellEntry| $ 9)) - |LNAGG-;indices;AL;1|) - (LETT #1# (SPADCALL |a| (|getShellEntry| $ 10)) - |LNAGG-;indices;AL;1|) - G190 (COND ((> |i| #1#) (GO G191))) - (LETT #0# (CONS |i| #0#) |LNAGG-;indices;AL;1|) - (LETT |i| (+ |i| 1) |LNAGG-;indices;AL;1|) (GO G190) - G191 (EXIT (NREVERSE0 #0#)))))))) + (LET ((|i| (SPADCALL |a| (|getShellEntry| $ 9))) + (#0=#:G1412 (SPADCALL |a| (|getShellEntry| $ 10))) + (#1=#:G1411 NIL)) + (LOOP + (COND + ((> |i| #0#) (RETURN (NREVERSE #1#))) + (T (LETT #1# (CONS |i| #1#) |LNAGG-;indices;AL;1|))) + (LETT |i| (+ |i| 1) |LNAGG-;indices;AL;1|)))))) (DEFUN |LNAGG-;index?;IAB;2| (|i| |a| $) (COND -- cgit v1.2.3