From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Predicate for true lists Date: Mon, 04 Jun 2018 15:46:30 +0100 Message-ID: <87tvqifw3d.fsf@tcd.ie> References: <87fu3vdjjk.fsf@tcd.ie> <87bmcqhhsf.fsf@tcd.ie> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1528123485 1468 195.159.176.226 (4 Jun 2018 14:44:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Jun 2018 14:44:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 04 16:44:40 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fPqis-0000DS-Pr for ged-emacs-devel@m.gmane.org; Mon, 04 Jun 2018 16:44:39 +0200 Original-Received: from localhost ([::1]:40142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPqkz-0000Y2-UZ for ged-emacs-devel@m.gmane.org; Mon, 04 Jun 2018 10:46:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPqkn-0000Wk-TP for emacs-devel@gnu.org; Mon, 04 Jun 2018 10:46:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPqkk-0000Yj-QG for emacs-devel@gnu.org; Mon, 04 Jun 2018 10:46:37 -0400 Original-Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]:42312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPqkk-0000YG-Hj for emacs-devel@gnu.org; Mon, 04 Jun 2018 10:46:34 -0400 Original-Received: by mail-wr0-x229.google.com with SMTP id w10-v6so44253548wrk.9 for ; Mon, 04 Jun 2018 07:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=IPaCj2mr4FkFN5uq0boqt8IDHYo+V7kzpGpvYIW3pxs=; b=P4jHrt7IjMUrvWkXBLaiojiRqBtK+vCHOeT7Uz1C6WPRkBgPThuz42hvN4Veks0Uec D/FK/BXN/JwXQHYz4YnhCdlaliiBX9f+0g/BIRXmkMJsvm3Jc6ZGCvcHLWpm+n7iS6MR Lp02QNWANU01vQJ5d2fH9mE2jrb6UTxp0Ckfk9KCVU7m7lnInuvAPAoUZpReAaTGzxkC BRj7sJNaBLh2VqDJbRtk5wMMZ3PlAgnjtGRE/HDAX0MQF5L69OLkw7txOWRfxouGX+Qj fkVG6AufqX4sqtxC9aIc9Th28cF5JvJ04OCVOIlRUQW8jz8VXSefmbqcKr7UTAkOuDRN Gk2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=IPaCj2mr4FkFN5uq0boqt8IDHYo+V7kzpGpvYIW3pxs=; b=mBSwfO0y2urm+zUxVBxFGvGc97uNOYj6VpeQO+m2qkCqV8Zs7mLI9NFPrTyPzqM87+ T89lE6Wgr90vYa4QFohORNlCYxXCk9wZGio7lSrxTNMOKkGDRHsjC1oojDGP+a1o3yWv wiD9Qz4kn51E1O1225bixmApN9/AM8LZ6luzcJo+ed7BgyOyPODcboG/KOUoN3/HJKxu 0iKzCTmzR3XdlF3hBaxK/yALrCaVt1Cr7tEHcPC8DTOLlNs2jN4Jm7sYeF5nvl0xHRkx DIYd2e/utvpvZ+zLp9fpIKr0owlSyCgO2dOWEBsAy0y6ym+GS+vBlba1QpAilBDzvqwh JkPQ== X-Gm-Message-State: ALKqPwctFDk5/4U6pZ8FVBTT3TJxoPH+2aElksHN3LXIWboaFYwfdJvZ ga0PC8Il2fUMB3k6LZjYQMO4CA== X-Google-Smtp-Source: ADUXVKJxW81ijbE92WM/mKLhWNMXCgHi2PYC1DrwtmLWA/LwQxvVhScVISIeHsOXgiEvhcx8EUqGZw== X-Received: by 2002:a50:ac53:: with SMTP id w19-v6mr24124829edc.51.1528123593273; Mon, 04 Jun 2018 07:46:33 -0700 (PDT) Original-Received: from localhost ([213.233.149.6]) by smtp.gmail.com with ESMTPSA id t14-v6sm23481311edd.69.2018.06.04.07.46.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Jun 2018 07:46:32 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 4 Jun 2018 10:08:10 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225996 Archived-At: Stefan Monnier writes: >> +@defun list-true-p object >> +This function returns @code{t} if OBJECT is a true list, @code{nil} >> +otherwise. In addition to satistying @code{listp}, a true list is >> +neither circular nor dotted. > > I think this function's true name is `list-proper-p` or `proper-list-p`. > At least I've always heard it talked about as "a proper list vs > a non-proper list". That was my impression as well, but "(elisp) Cons Cells" states: Also by convention, the CDR of the last cons cell in a list is =E2=80=98= nil=E2=80=99. We call such a =E2=80=98nil=E2=80=99-terminated structure a =E2=80=9Ctru= e list=E2=80=9D. The documentation of functions 'append' in "(elisp) Building Lists" and 'vconcat' in "(elisp) Vector Functions" similarly refer to "true" lists. If "proper" is the more common/preferred term, I should probably update those nodes in addition to my patch, right? > As for `cdr` vs CDR. The all-caps version is a metavariable referring > to something which we happened to call CDR. E.g. > > Foo takes the form (CAR . CDR) where CDR is blabla. Right, but I see no such destructuring/metasyntax in the Elisp manual. Both "(elisp) Cons Cells" and "(elisp) Cons Cell Type", for example, refer directly to the CAR and CDR slots of a cons cell, without first illustrating their structure. Is that OK? Thanks, --=20 Basil