help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: replacing a certain element in a list with another


From: Roland Winkler
Subject: Re: replacing a certain element in a list with another
Date: 22 Oct 2003 22:06:53 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Kai Grossjohann <address@hidden> writes:
> Well, (nreverse x) does destructively modify the list x, but
> afterwards the value if x is not what you think:
> 
> *** Welcome to IELM ***  Type (describe-mode) for help.
> ELISP> (setq x (list 1 2 3 4))
> (1 2 3 4)
> 
> ELISP> (nreverse x)
> (4 3 2 1)
> 
> ELISP> x
> (1)
> 
> ELISP> 
> 
> Clear?

...not really  :-)

I tried to understand the docstring and the info page. However, I
could not really make use of it. So what is it that nreverse is
doing with its argument? And when is this useful??

Thanks,

Roland


reply via email to

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