[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding Lists/Sequences
From: |
David Kastrup |
Subject: |
Re: Adding Lists/Sequences |
Date: |
Wed, 24 Sep 2008 00:11:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Nordlöw <per.nordlow@gmail.com> writes:
>
>> Is there a general function, say foo, that adds lists or, even better,
>> sequences together?
>>
>> I want this
>> (foo '("a" "b") '("c" "d"))
>> to evaluate to
>> '("a" "b" "c" "d")
>
> ,----
> | ELISP> (nconc '("a" "b" "c") '("d" "e" "f"))
> | ("a" "b" "c" "d" "e" "f")
> `----
>
> Note: `append' is not destructive
This is so bad that I can't believe it.
(defun ugh () (nconc '("a" "b" "c") '("d" "e" "f")))
(ugh) -> ("a" "b" "c" "d" "e" "f")
(ugh) -> ("a" "b" "c" "d" "e" "f" . #3)
The latter is a tail-cyclic list.
(ugh) -> hangs
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Adding Lists/Sequences, Nordlöw, 2008/09/23
- Message not available
- Re: Adding Lists/Sequences,
David Kastrup <=
- Re: Adding Lists/Sequences, Thierry Volpiatto, 2008/09/24
- Re: Adding Lists/Sequences, Nikolaj Schumacher, 2008/09/24
- Re: Adding Lists/Sequences, Thierry Volpiatto, 2008/09/24
- RE: Adding Lists/Sequences, Drew Adams, 2008/09/24
- Re: Adding Lists/Sequences, Thierry Volpiatto, 2008/09/24
- Re: Adding Lists/Sequences, David Kastrup, 2008/09/24
- Re: Adding Lists/Sequences, Thierry Volpiatto, 2008/09/24
- RE: Adding Lists/Sequences, Drew Adams, 2008/09/24
- Re: Adding Lists/Sequences, Thierry Volpiatto, 2008/09/24
- Message not available
- Re: Adding Lists/Sequences, Tim X, 2008/09/25