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: Sebastian Miele
Subject: Re: Making a list of lists
Date: Mon, 03 Jul 2023 18:44:04 +0200

> From: uzibalqa <uzibalqa@proton.me>
> Date: Mon, 2023-07-03 16:41 +0000
>
> 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 ?

Examples:

  (setq mylist (cons entry1 (cons entry2 mylist)))
  (push entry2 mylist) (push entry1 mylist)
  (add-to-list 'mylist entry2) (add-to-list 'mylist entry1)
  (setq mylist `(,entry1 ,entry2 ,@mylist))



reply via email to

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