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

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

Re: Looping lists through mapcar


From: uzibalqa
Subject: Re: Looping lists through mapcar
Date: Thu, 25 Aug 2022 10:49:12 +0000

------- Original Message -------
On Wednesday, August 24th, 2022 at 12:09 PM, Jean Louis <bugs@gnu.support> 
wrote:


> * Emanuel Berg incal@dataswamp.org [2022-08-24 15:05]:
> 
> > > (defun my-assoc-lists ()
> > > (let* ((name "andromeda-assoc-table-")
> > > (list '())
> > > (counter 1))
> > > (while (boundp (intern (concat name (number-to-string counter))))
> > > (setq list (append list (symbol-value (intern (concat name 
> > > (number-to-string counter))))))
> > > (setq counter (1+ counter)))
> > > list))
> > 
> > DANGER!
> > Don't read the above code.
> > Your own programming could
> > deteriorate as a result.
> 
> 
> But it works, doesn't it?
> 
> How can you make it easier?
> 
> --
> Jean

Disregard the comments by Berg.  He is just being condescending as happens 
quite too often in
society.

I wanted to ask you whether one should use an "alist" or a "list of alists".  
Because 
"my-assoc-lists" makes "an alist", but  (dolist (aggr (my-assoc-lists))  
accepts "a list
of alists".




reply via email to

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