|
From: | Jean Louis |
Subject: | Re: Testing whether a list contains at least one non-nil element |
Date: | Tue, 25 Oct 2022 13:50:28 +0300 |
User-agent: | Mutt/2.2.7+37 (a90f69b) (2022-09-02) |
* Heime <heimeborgia@protonmail.com> [2022-10-25 13:18]: > > I would like to test whether a list contains at least one non-nil element? > If I do that, then > I would be able to continue a loop where a non-nil element would mean that a > match was found. Here is the test for non nil element: (elt (delq nil (list nil nil)) 0) ⇒ nil (elt (delq nil (list nil 1)) 0) ⇒ 1 -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/
[Prev in Thread] | Current Thread | [Next in Thread] |