[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] odd looping behavior
From: |
daly |
Subject: |
[Axiom-developer] odd looping behavior |
Date: |
Fri, 29 Jul 2011 23:44:46 -0400 |
Camm,
I am seeing some odd behavior in loops.
If I write
(let (result)
(setq a
(do ((x somelist (cdr x)) (result nil))
((atom x) (reverse result))
(setq result (cons (fn x) result)))))
or, in a simple form as
(let (result)
(setq a
(dolist (x somelist (nreverse result))
(setq result (cons (fn x) result)))))
I do not get the same behavior as
(setq a
(prog ()
(return
(do ((x somelist (cdr x)) (result nil))
((atom x) (reverse result))
(setq result (cons (fn x) result))))))
That is, if the result is scoped outside of the
setq and used in a loop then I appear to get
different results than if it has prog scope locally.
The failure is stable no matter what I do to the
inner loop. I have tried it using the loop macro.
Nothing seems to change the result.
Unfortunately the failure is deep within the build
process of Axiom and hard to isolate. I am trying to
get a test case.
The version I am using is at:
http://github.com/daly/axiom/blob/master/zips/gcl-2.6.8pre4.tgz
Tim
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] odd looping behavior,
daly <=