diff options
Diffstat (limited to 'src/boot/ast.boot')
-rw-r--r-- | src/boot/ast.boot | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot index d76fcb72..1e45f7f2 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -383,8 +383,10 @@ bfListReduce(op,y,itl)== bfLp2(extrait,itl,body) bfMakeCollectInsn(expr,prev,head,adv) == - bfIf(['NULL,head],['SETQ,head,['SETQ,prev,expr]], - bfMKPROGN [['RPLACD,prev,expr],['SETQ,prev,[adv,prev]]]) + firstTime := bfMKPROGN + [['SETQ,head,expr],['SETQ,prev,(adv is 'CDR => head; [adv,head])]] + otherTime := bfMKPROGN [['RPLACD,prev,expr],['SETQ,prev,[adv,prev]]] + bfIf(['NULL,head],firstTime,otherTime) bfDoCollect(expr,itl,adv,k) == head := bfGenSymbol() -- pointer to the result |