conc does not rewrite N if N is an empty list.

# 1.
: (let (N '()) (conc N '(A)))
-> (A)
# 2
: (let (N '()) (conc N '(A)) N)
-> NIL
# 3.
: (let (N '(NIL)) (conc N '(A)) N)
-> (NIL A)
# 4.
: (let (N '()) (setq N (conc N '(A))) N)
-> (A)

In #2 above, I was expecting N to be (A)
If N is not empty, as in #3 it works as expected, or I can force the
assignment, as in #4... which shouldn't be necessary.

Originally I wanted to do:
:  (let (N '()) (for X 10 (conc N '(A))) N)
-> NIL  # expected '(A A A A A A A A A A)

..and this goes into never land. [kill -9]
 (let (N '()) (for X 10 (setq N (conc N '(A)))) N)


/Lindsay

Reply via email to