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

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

Re: Check whether an object is an alist


From: Heime
Subject: Re: Check whether an object is an alist
Date: Tue, 17 Sep 2024 08:45:54 +0000





Sent with Proton Mail secure email.

On Monday, September 16th, 2024 at 10:29 PM, Heime <heimeborgia@protonmail.com> 
wrote:

> Is there a function that checks whether an object is an alist.
> Have only found listp.

Because I may have to come up with a solution, I have made this one.
Am I missing anything ?

(defun torium-alist-p (obj)
  "Return t if object OBJ is an association list (alist)."
  (and (listp obj)
       (not (null obj))
       (every (lambda (x)
                (and (consp x)
                     (not (null x))))
              obj)))







reply via email to

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