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

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

Re: Making a list of lists


From: uzibalqa
Subject: Re: Making a list of lists
Date: Mon, 03 Jul 2023 16:41:17 +0000

------- Original Message -------
On Tuesday, July 4th, 2023 at 4:24 AM, Sebastian Miele <iota@whxvd.name> wrote:


> > From: uzibalqa uzibalqa@proton.me
> > Date: Mon, 2023-07-03 16:18 +0000
> > 
> > I want to make a list of lists. Suppose I make a list by calling this 
> > function
> > 
> > (defun linseq (&rest sequence)
> > sequence)
> > 
> > How can then I have a function that adds the list as an element to a list 
> > of lists ?
> 
> 
> The Emacs Lisp manual contains such information.
> 
> `linseq' basically is the built-in` list' function. You could do
> 
> (linseq (linseq 'a 'b 'c))
> 
> which is equivalent to:
> 
> (list (list 'a 'b 'c))
> 
> Another possibility is the "backquote construct" (also see the manual).
> For example
> 
> `(,(list 'a 'b 'c))
> 
> has the same result.

I do not follow your explanation very well.

Suppose I have mylist, with a number of lists constructed as follows

(setq mylist '())
(setq entry1 (linseq "A" "B" "C"))
(setq entry2 (linseq "D" "E" "F"))

Then how do I add entry1 and entry2, to mylist ?










reply via email to

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