12 Nov
2004
12 Nov
'04
4:15 p.m.
Andreas Fuchs wrote:
(iter (for i index-of-vector #(0 1 2 3 4) downto 0 by 2) (collect i)) ; (4 2 0)
(iter (for i index-of-vector #(0 1 2 3 4) downto 0 by 3) (collect i)) ; (3 0)
I'm undecided as to which is preferable. Your interpretation has the advantage that it's more in line with the behavior of the counting FOR driver, so I'm tending towards that.
FWIW, I totally agree with Joerg's interpretation. (iter (for i from 4 downto 0 by 3) (collect i)) returns (4 1), so I would expect that (iter (for i index-of-vector #(0 1 2 3 4) downto 0 by 3) also returns (4 1), NOT (3 0). Regards, Arthur Lemmens