https://arclanguage.github.io/ref/iteration.html

(collect x for x in xs if odd.x)

-----

(def l (start end) (let lis `(1) (pop lis) (while (<= start end) (= lis `(,@lis ,start)) (++ start)) lis))

reply

1. Is there a reason you start with `(1) and then pop? Why not just initialize lis to nil?

2. Here's a slightly more idiomatic implementation (also more efficient, because it avoids deconstructing and reconstructing lis on every iteration):

(def l (start end) (accum acc (for i start (<= i end) ++.i acc.i)))

arc> (help accum) arc> (help for)