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/STAGG-.lsp | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'src/algebra/strap/STAGG-.lsp') diff --git a/src/algebra/strap/STAGG-.lsp b/src/algebra/strap/STAGG-.lsp index 1d31c1cd..2c69bba1 100644 --- a/src/algebra/strap/STAGG-.lsp +++ b/src/algebra/strap/STAGG-.lsp @@ -50,25 +50,24 @@ (SPADCALL |x| (|getShellEntry| $ 9))) (DEFUN |STAGG-;first;ANniA;3| (|x| |n| $) - (PROG (#0=#:G1447 |i|) + (PROG () (RETURN - (SEQ (SPADCALL - (PROGN - (LETT #0# NIL |STAGG-;first;ANniA;3|) - (SEQ (LETT |i| 1 |STAGG-;first;ANniA;3|) G190 - (COND ((QSGREATERP |i| |n|) (GO G191))) - (LETT #0# - (CONS (|STAGG-;c2| |x| - (LETT |x| - (SPADCALL |x| - (|getShellEntry| $ 13)) - |STAGG-;first;ANniA;3|) - $) - #0#) - |STAGG-;first;ANniA;3|) - (LETT |i| (QSADD1 |i|) |STAGG-;first;ANniA;3|) - (GO G190) G191 (EXIT (NREVERSE0 #0#)))) - (|getShellEntry| $ 15)))))) + (SPADCALL + (LET ((|i| 1) (#0=#:G1447 NIL)) + (LOOP + (COND + ((> |i| |n|) (RETURN (NREVERSE #0#))) + (T (LETT #0# + (CONS (|STAGG-;c2| |x| + (LETT |x| + (SPADCALL |x| + (|getShellEntry| $ 13)) + |STAGG-;first;ANniA;3|) + $) + #0#) + |STAGG-;first;ANniA;3|))) + (LETT |i| (+ |i| 1) |STAGG-;first;ANniA;3|))) + (|getShellEntry| $ 15))))) (DEFUN |STAGG-;c2| (|x| |r| $) (COND -- cgit v1.2.3