[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why doesn't nconc change my variable?

From: Marcin Borkowski
Subject: Why doesn't nconc change my variable?
Date: Sun, 05 Oct 2014 03:36:49 +0200

Hi list,

I don't get it.

(setq my-list ())
(nconc my-list '("wtf"))

and my-list is still nil.

If, OTOH, I do

(setq my-list ())
(setq my-list (nconc my-list '("wtf")))

my-list is ("wtf").

Why is that so?  I though nconc is supposed to change all its arguments
but the last one.  Is the latter construct a correct way of adding an
element at the end of the list?


Marcin Borkowski
Adam Mickiewicz University

reply via email to

[Prev in Thread] Current Thread [Next in Thread]