[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 <kai.grossjohann@gmx.net> 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
- Re: replacing a certain element in a list with another, Kai Grossjohann, 2003/10/16
- Re: replacing a certain element in a list with another,
Roland Winkler <=
- Re: replacing a certain element in a list with another, Barry Margolin, 2003/10/22
- Re: replacing a certain element in a list with another, Barry Margolin, 2003/10/23
- Re: replacing a certain element in a list with another, Roland Winkler, 2003/10/23
- Re: replacing a certain element in a list with another, Barry Margolin, 2003/10/23
- Re: replacing a certain element in a list with another, Roland Winkler, 2003/10/24
- Re: replacing a certain element in a list with another, Barry Margolin, 2003/10/24
- Re: replacing a certain element in a list with another, Oliver Scholz, 2003/10/25