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

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

Re: What's the canonical way to check "alistp"?


From: Kaushal Modi
Subject: Re: What's the canonical way to check "alistp"?
Date: Thu, 01 Mar 2018 15:29:44 +0000

On Thu, Mar 1, 2018 at 10:21 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:

> What's the best way to check if every element in a list is also a list?
>

I don't know if there's a more concise way.. but this seems like a good way:

(if (eq 0 (cl-count-if (lambda (el) (not (listp el))) MY-VAR)) ..)
-- 

Kaushal Modi


reply via email to

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