From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.help Subject: Re: What's the canonical way to check "alistp"? Date: Thu, 01 Mar 2018 15:29:44 +0000 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1519918127 15184 195.159.176.226 (1 Mar 2018 15:28:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Mar 2018 15:28:47 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 01 16:28:43 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1erQ8N-0002nB-2F for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Mar 2018 16:28:39 +0100 Original-Received: from localhost ([::1]:57587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erQAI-0005g9-Is for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Mar 2018 10:30:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1erQ9c-0005fK-OA for help-gnu-emacs@gnu.org; Thu, 01 Mar 2018 10:29:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1erQ9b-0002Ti-To for help-gnu-emacs@gnu.org; Thu, 01 Mar 2018 10:29:56 -0500 Original-Received: from mail-yw0-x231.google.com ([2607:f8b0:4002:c05::231]:46476) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1erQ9b-0002TB-Om for help-gnu-emacs@gnu.org; Thu, 01 Mar 2018 10:29:55 -0500 Original-Received: by mail-yw0-x231.google.com with SMTP id q184so2201442ywh.13 for ; Thu, 01 Mar 2018 07:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=tjd0sHqQmZeObulwMWoyfidqFT0T6TskTWBR2XCJO3Y=; b=KAOHkmi7/0ix4H0Se1BMDYz5OJJ/LyJyukUsgxi6Nb7xtWj91e4tCBlwN694ImG8mp g8lYSiDJXTeD4S7L4I3BlB946qx8kw84pqNypAFkCmZU88gfZS2jiAmRJEfCLYRrjnpE hfhejwN1wgkePmkOKC2qubMS2EcDREhmZMvQfdVs7HcjZMDuIfOIYX3iClgSkf3VjdkU 0zHrCg1zpYXUsjk5CGUvBkABSbazbhF3/QH7+h4lxo+D25evCIxFUF9AboEeT3N3mLq5 GaAP/c7uyWeZci2lKAGHtnCjHLgKBBf/DRrhp8JwS4gQx25vg/ZDkIeIL5fjwBnlon8X Qnsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=tjd0sHqQmZeObulwMWoyfidqFT0T6TskTWBR2XCJO3Y=; b=oOoPNIuCDx/t3yhgI00uHEBxEpM82HGZVIKnb+WAWaG7qpxctfDqsHloJlNmTQfrMK oAx2cpJLF4WoDBJVl0eEOrpKBUUTTT6hF1oRc3aT3XsqgSSJuxUSvxF6pr0/0K+Fsn/y XgWLIrvWstBCmYtiLAJDW8hiHg4+281BTjYyN/3rW/va6gD71cPJLgixIAIGomaUqXmM JQ5s1SrfkjprAVpWjVYtEfr3QZQCZLvSNpKn73WREQ8FtiicFogU3zwM2w44xxYP3pip wa2k9N5C+CjTuFjnbWAEUoTCFVsdpzQuMhJ9c1BcXI+t/YL1UhXxEZeZRXEm9Q3ED3bB gNUw== X-Gm-Message-State: APf1xPD8iOntUtr3kBtewojTFYEjbW35n8/Tw7ENauRtr0IXE5ZQbkYz qFx/kTPfelgxDMzX6JHgMF5rSxVFqVmpS+x2JZk= X-Google-Smtp-Source: AG47ELuBAXvCkVjUu3pYvtAnJVwNvP1uK/VwFftgCTvnnYAF8D3meoR7WF7FkjUfJ+uxOjFepQwCEPPLP35v6uicp6o= X-Received: by 10.13.241.67 with SMTP id a64mr1432351ywf.514.1519918194696; Thu, 01 Mar 2018 07:29:54 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::231 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116100 Archived-At: On Thu, Mar 1, 2018 at 10:21 AM Kaushal Modi 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