all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Looping lists through mapcar
@ 2022-08-23 12:16 uzibalqa
  2022-08-23 19:13 ` Jean Louis
  0 siblings, 1 reply; 19+ messages in thread
From: uzibalqa @ 2022-08-23 12:16 UTC (permalink / raw)
  To: uzibalqa via Users list for the GNU Emacs text editor


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.


(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))))


(defun construct-assoc-table (n)
  "Return value of symbol `assoc-table-N', an alist of
paired string elements."

  (symbol-value (intern (format "assoc-table-%d" n))))



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-08-26  2:48 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-23 12:16 Looping lists through mapcar uzibalqa
2022-08-23 19:13 ` Jean Louis
2022-08-24  5:34   ` uzibalqa
2022-08-24  6:24     ` Jean Louis
2022-08-24  9:03       ` uzibalqa
2022-08-24  9:54         ` Emanuel Berg
2022-08-24 10:52         ` Jean Louis
2022-08-24 11:02           ` uzibalqa
2022-08-24 11:49             ` uzibalqa
2022-08-24 16:17               ` Jean Louis
2022-08-24 12:08             ` Jean Louis
2022-08-24 11:44           ` Emanuel Berg
2022-08-24 12:09             ` Jean Louis
2022-08-25 10:49               ` uzibalqa
2022-08-25 15:57                 ` Jean Louis
2022-08-26  2:48                   ` uzibalqa
2022-08-24 12:24             ` uzibalqa
2022-08-25  0:31             ` uzibalqa
2022-08-24 23:56           ` uzibalqa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.