[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looping lists through mapcar
From: |
Jean Louis |
Subject: |
Re: Looping lists through mapcar |
Date: |
Tue, 23 Aug 2022 22:13:44 +0300 |
User-agent: |
Mutt/+ () (2022-06-11) |
* uzibalqa <uzibalqa@proton.me> [2022-08-23 15:18]:
>
> I would like to pass a number of alists in the form assoc-table-N so that I
> can store data
> in another list named `nscrip'. Would like to manage the lists without
> having to list them
> individually. My idea has been to use mapcar, but the scheme has not worked
> out, and the lists
> are net being passed through the loop.
I find it difficult to understand your above description. I got
the idea that you wish to name alists such as assoc-table-1,
assoc-table-2 and that you put those symbols in a new list.
;; (dolist (aggr (list (mapcar #'construct-assoc-table
;; (number-sequence 1 8))))
;; (setq rplc (cdr (assoc word aggr)))
;; (unless (null rplc)
;; (add-to-list 'nscrip
;; (replace-regexp-in-string word rplc word))))
I cannot understand the above.
Do this: {C-h f add-to-list RET} and find quote there:
"This is handy to add some elements to configuration variables,
but please do not abuse it in Elisp code, where you are usually
better off using ‘push’ or ‘cl-pushnew’."
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- Looping lists through mapcar, uzibalqa, 2022/08/23
- Re: Looping lists through mapcar,
Jean Louis <=
- Re: Looping lists through mapcar, uzibalqa, 2022/08/24
- Re: Looping lists through mapcar, Jean Louis, 2022/08/24
- Re: Looping lists through mapcar, uzibalqa, 2022/08/24
- Re: Looping lists through mapcar, Emanuel Berg, 2022/08/24
- Re: Looping lists through mapcar, Jean Louis, 2022/08/24
- Re: Looping lists through mapcar, uzibalqa, 2022/08/24
- Re: Looping lists through mapcar, uzibalqa, 2022/08/24
- Re: Looping lists through mapcar, Jean Louis, 2022/08/25
- Re: Looping lists through mapcar, Jean Louis, 2022/08/25
- Re: Looping lists through mapcar, Emanuel Berg, 2022/08/24