From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 17 10:55:30 2016 Received: (at submit) by debbugs.gnu.org; 17 Jul 2016 14:55:30 +0000 Received: from localhost ([127.0.0.1]:54656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOnTe-0006uy-2J for submit@debbugs.gnu.org; Sun, 17 Jul 2016 10:55:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOnTc-0006um-MT for submit@debbugs.gnu.org; Sun, 17 Jul 2016 10:55:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOnTW-0007vq-K6 for submit@debbugs.gnu.org; Sun, 17 Jul 2016 10:55:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=BAYES_50,XPRIO autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39448) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOnTW-0007vd-Hd for submit@debbugs.gnu.org; Sun, 17 Jul 2016 10:55:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOnTU-0006bv-C1 for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 10:55:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOnTP-0007tY-Ec for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 10:55:19 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:22979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOnTP-0007sV-4U for bug-gnu-emacs@gnu.org; Sun, 17 Jul 2016 10:55:15 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6HEtBa6027278 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 17 Jul 2016 14:55:12 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6HEtBB8029789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 17 Jul 2016 14:55:11 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u6HEt75I013219 for ; Sun, 17 Jul 2016 14:55:10 GMT MIME-Version: 1.0 Message-ID: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> Date: Sun, 17 Jul 2016 07:55:07 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.5; doc string of `cl-reduce' X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Please state in the doc string what the function does. IOW, explain/describe/specify what "reduce" means. Do not suppose that Emacs Lisp users are all familiar with functional programming etc. If _you_ understand it, you should be able to describe it in a couple of sentences. It's not a complicated thing, but just repeating the word "reduce" from the function name is not sufficient - not helpful. In GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32' From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 17 11:57:29 2016 Received: (at 24014) by debbugs.gnu.org; 17 Jul 2016 15:57:29 +0000 Received: from localhost ([127.0.0.1]:54677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOoRd-0008K4-HS for submit@debbugs.gnu.org; Sun, 17 Jul 2016 11:57:29 -0400 Received: from mout.web.de ([217.72.192.78]:61221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOoRb-0008Jq-MT for 24014@debbugs.gnu.org; Sun, 17 Jul 2016 11:57:28 -0400 Received: from drachen.dragon ([88.67.73.210]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0Lr2VT-1at4Fk3aCp-00eZtE; Sun, 17 Jul 2016 17:57:16 +0200 From: Michael Heerdegen To: Drew Adams Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> Date: Sun, 17 Jul 2016 17:57:14 +0200 In-Reply-To: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> (Drew Adams's message of "Sun, 17 Jul 2016 07:55:07 -0700 (PDT)") Message-ID: <87zipgmf51.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:Q09o3F6xgKH6Y7GM94+lGqXIe7ruhD2a4LTfPu85DRBAeKaAngQ IKVTZI/7hcOhRMswZCM2mI3zSps3ck99+cmx/o46Iy8m+ZqvAMOLH2iEtNH4Ol/f6w79ZPf rTC7xj7pj2jguuVtVfGN03UPBSfzER19QdEd9iFVm0/TMqfq397B8uR8ZqZwgGfGqXXWr9Y mYtiuwlDrGvCgSA+CvP1Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:ultsLGLj07g=:V+K1fQ9X4TRYLDlecdwguQ AbVIvbFB2YbmBD1KP1RnqPSWO1q1KcoIVBfwkMvNXCQtcOF0MSfsu34JefRrNBNtjOfgJa2aT QDxlHZpHVS3tjlS7FblIW0V4/hrYllMkS2Rosyi+jKXclSmD7cv/pkK3OM8M+KbPGbVEpAtWD NmvCctUsSvzAc8eNY975OWOOr8xBK2MEmbpwVm0WZhmuJ088czgQW5KDr+UU5EXX32R9B0LFN R5WyQT91m9Batv5JR+Z2sjOy5ppi1/BtSmFS3ndAsjKTEzoXVXMEUIaxnt+exdkv2xbW4ExPt GjgBKAzpBwPLwBWvHz4c5pnZtD5zU3GqsjMfHRKMFZhqYGRmb2Ju9MNpRZuddqhmvpiuidjuF 2hnQeOMaKzE+Qn8JagxTdPN/BuMz0KlVQYrdhwH/Qm3mzyXWpMsX6FMZD7l/qScAem49bq7ho sUJsdzUZpAEZRWZyzmtc5lvgRA9Wi/njHFiGuyyv75eQlYYXu8H0wnC/gymWfqkz1NqmnmrbQ ObH2dYtirHuneGQ51iurn6iJ7zcG/n9JnoAlrzBKNMWJoJ2CC/L9REkc6HqPQoYzMO14r6sJ7 0wgwvD+4CTn6kSGagPPOprSuVTRHEYWTMy7Rfuo2TtjwmQaGpNXTnZ45OGtTYPku8kCRM+7CX G/XdRYWs261xqO0hDTsKhprb0We/x5SxZ3kWAhTJWShre0ib5H3Y/Uu7iZ+zCb3pAN4Z7HlKl LzkXYI0Hbw+phDgahLd9wNLM1afMmnm6GTVs2IVqUgtcZRLcGxbBcBuaxeP6L0IYI496Tav13 UnTSr+g X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 24014 Cc: 24014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) Drew Adams writes: > Please state in the doc string what the function does. IOW, > explain/describe/specify what "reduce" means. Do not suppose that Emacs > Lisp users are all familiar with functional programming etc. > > If _you_ understand it, you should be able to describe it in a couple of > sentences. It's not a complicated thing, but just repeating the word > "reduce" from the function name is not sufficient - not helpful. I also find the explanation in the manual confusing: "This function combines the elements of SEQ using an associative binary operation." The function does _not_ need to be associative. The sentence later: "If =E2=80=98:from-end=E2=80=99 is true, the reduction is right-associati= ve instead of left-associative." makes sense, of course, but above, the word "associative" does not mean more than "any", and without reading the later text, it can easily be misunderstood. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 17 17:18:30 2016 Received: (at 24014) by debbugs.gnu.org; 17 Jul 2016 21:18:30 +0000 Received: from localhost ([127.0.0.1]:54879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOtSI-0005L5-7T for submit@debbugs.gnu.org; Sun, 17 Jul 2016 17:18:30 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOtSF-0005Ku-A3 for 24014@debbugs.gnu.org; Sun, 17 Jul 2016 17:18:28 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 41539202C8; Sun, 17 Jul 2016 17:18:25 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Sun, 17 Jul 2016 17:18:25 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=XShf4Hgn6x9Cwi36yiG8Uoo3nO0=; b=jKIRf G1LS45lbp/o7DHU++mWVLnLWQZ3WiyF4TeSwQaFq8weNEMz0Uu+B3lr7Q46aXtQH 44gLcYNK8EP7lgryNHqJFa6rxMz00OxO0nhx3P1w9J5iad13aK5XR/frb8OzYVoe Y32gVkf37u2OUSZ8Qq6mSa7zsBsfp/9u4cB/mU= X-Sasl-enc: oD4KTAB1AAUypx1kS53zSLVmqn6nunuJ57ZNWuqU/Qb7 1468790304 Received: from strawberry (lfbn-1-7726-61.w92-167.abo.wanadoo.fr [92.167.139.61]) by mail.messagingengine.com (Postfix) with ESMTPA id 7440DCCD81; Sun, 17 Jul 2016 17:18:24 -0400 (EDT) From: Nicolas Petton To: Michael Heerdegen , Drew Adams Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' In-Reply-To: <87zipgmf51.fsf@web.de> References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.95.1 (x86_64-redhat-linux-gnu) Date: Sun, 17 Jul 2016 23:18:12 +0200 Message-ID: <878tx0hskr.fsf@petton.fr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24014 Cc: 24014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Michael Heerdegen writes: > Drew Adams writes: > >> Please state in the doc string what the function does. IOW, >> explain/describe/specify what "reduce" means. Do not suppose that Emacs >> Lisp users are all familiar with functional programming etc. The documentation of `seq-reduce' is probably not perfect, but at least it tries to explain what reducing means: Return the result of calling FUNCTION with INITIAL-VALUE and the first element of SEQUENCE, then calling FUNCTION with that result and the second element of SEQUENCE, then with that result and the third element of SEQUENCE, etc. If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called. Nico --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJXi/YUAAoJECM1h6R8IHkQgEwIAMWvq8D+SJZudNvRskgfNwNY MhmfMVCivMDnvjHf3JAFejODB+acFdy+/Fmzd7xqq1lYkakRYlT8dMDBUuOBzfhB T09C2bpwtjJRLcPvvAX12q/x6UvGBj6Y0F6MYX8DAUvdheJOrRa/SBZBWQugpQJd SNsjRqx4DTLE38t03HHbjmdsHtnHYNPLC1ecQ80ze5qtIqNfOjMvJ0VsxzDLrZQQ QHv6QBStuFsYtK9QGrlIcVCtteL2Ff87aGVjn9d13/e+zODyIcnb0/XoiNttzwBq Sx4Un5Os6JiRK4A2HDvHLoGFdvSZWYUtL2rdRLLwQW74ykkrFMSz4OnQkQjKSUM= =8wxZ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 00:41:52 2016 Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 04:41:53 +0000 Received: from localhost ([127.0.0.1]:54997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP0NM-0000VF-M9 for submit@debbugs.gnu.org; Mon, 18 Jul 2016 00:41:52 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:19460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP0NL-0000V3-3p for 24014@debbugs.gnu.org; Mon, 18 Jul 2016 00:41:51 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6I4figa000393 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 04:41:44 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6I4fhJ3006779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 04:41:44 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u6I4fh3Z026126; Mon, 18 Jul 2016 04:41:43 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 17 Jul 2016 21:41:42 -0700 (PDT) From: Drew Adams To: Michael Heerdegen Subject: RE: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> In-Reply-To: <87zipgmf51.fsf@web.de> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 24014 Cc: 24014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) > > Please state in the doc string what the function does. IOW, > > explain/describe/specify what "reduce" means. Do not suppose that Emac= s > > Lisp users are all familiar with functional programming etc. > > > > If _you_ understand it, you should be able to describe it in a couple o= f > > sentences. It's not a complicated thing, but just repeating the word > > "reduce" from the function name is not sufficient - not helpful. >=20 > I also find the explanation in the manual confusing: >=20 > "This function combines the elements of SEQ using an associative > binary operation." >=20 > The function does _not_ need to be associative. The sentence later: >=20 > "If =E2=80=98:from-end=E2=80=99 is true, the reduction is right-associa= tive instead > of left-associative." >=20 > makes sense, of course, but above, the word "associative" does not mean > more than "any", and without reading the later text, it can easily be > misunderstood. Yes, and even when such text is corrected, it is not necessarily understandable by many users. We should not assume that users are math majors. Even providing a functional-programming definition of `reduce' is better than just describing it in abstract terms, if we can't come up with a more down-to-earth description. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 00:45:03 2016 Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 04:45:03 +0000 Received: from localhost ([127.0.0.1]:55001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP0QR-0000aQ-5c for submit@debbugs.gnu.org; Mon, 18 Jul 2016 00:45:03 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP0QP-0000Zf-Jj for 24014@debbugs.gnu.org; Mon, 18 Jul 2016 00:45:01 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6I4isGY028045 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 04:44:54 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6I4irCr010756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 04:44:53 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u6I4ipVk026504; Mon, 18 Jul 2016 04:44:52 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 17 Jul 2016 21:44:50 -0700 (PDT) From: Drew Adams To: Nicolas Petton , Michael Heerdegen Subject: RE: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <878tx0hskr.fsf@petton.fr> In-Reply-To: <878tx0hskr.fsf@petton.fr> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 24014 Cc: 24014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) > >> Please state in the doc string what the function does. IOW, > >> explain/describe/specify what "reduce" means. Do not suppose that Ema= cs > >> Lisp users are all familiar with functional programming etc. >=20 > The documentation of `seq-reduce' is probably not perfect, but at least > it tries to explain what reducing means: >=20 > Return the result of calling FUNCTION with INITIAL-VALUE and the > first element of SEQUENCE, then calling FUNCTION with that result and > the second element of SEQUENCE, then with that result and the third > element of SEQUENCE, etc. >=20 > If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called= . Much better, yes. This is the right level at which to describe what it does for most programmers, IMO. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 04:54:43 2016 Received: (at submit) by debbugs.gnu.org; 18 Jul 2016 08:54:43 +0000 Received: from localhost ([127.0.0.1]:55022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP4K3-0006Wj-9E for submit@debbugs.gnu.org; Mon, 18 Jul 2016 04:54:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP4K1-0006WV-I6 for submit@debbugs.gnu.org; Mon, 18 Jul 2016 04:54:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP4Jv-0000BW-HQ for submit@debbugs.gnu.org; Mon, 18 Jul 2016 04:54:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4Jv-0000Ab-DV for submit@debbugs.gnu.org; Mon, 18 Jul 2016 04:54:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4Jt-0007Iw-1y for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 04:54:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP4Jo-00008Q-TU for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 04:54:32 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:61859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP4Jo-00007u-Ic for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 04:54:28 -0400 Received: from [192.168.1.82] ([109.24.225.43]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MTKyZ-1bpIgO0dNv-00SKZd for ; Mon, 18 Jul 2016 10:54:27 +0200 Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' To: bug-gnu-emacs@gnu.org References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Message-ID: <578C993D.10507@gmail.com> Date: Mon, 18 Jul 2016 10:54:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bCpfKaWkxsM5b5VKLA5gsBtgEXP9IlQuu" X-Provags-ID: V03:K0:rELnA4qE3AyroK2k/He1y/euaMDCP2RkdJdm3q3kxjm8leXD9NG wVlHDXe+n32VFbWnY3OmjMLu6MK3PATWBInDVdHZa0aiR5a/fgY8DYOYq3mMAINzErYdQZf v8kTm3BJknjVXThqFFpAZ0MpTtqlKbHhW+iCpIjfsrBaNWch02BLm4kuqSl98WQG5LD6aWL xE88wkBN5Q73IlzgBzjQQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:NkfZ1wXlCro=:Fvin/OEUrBjt9EKff20FIQ gd0EDGDpzMiHJQ0wEPk66XJ3sXIiWlaIjd2FNSs55BYwWaDlJFdLtmTpBtLHVcqa2hCr40jJZ 8UwjOmdglG6Rr2Vm5WVuUPL2UjHRvcbgjALXPe3iqJXdcQresAI0FgWKSb4zvLiHZxYJwq2iP zvSS9gwWWx4XgY4uybJKeJTg4py/H3EVY+qQ39ft8B0i/yJ8FwEm3aeMEp0ukTE/loySLCdmd 94QUn/mLIibck1H90xxleoMvzbPbX9YwWeecPyuo3u5MCproHBlvsn3evm3AvFP7F4FGo3nk3 8JkSLAbRShUJRy6XEe1MLeIikVLVkyOBl5sV8V+pop59NH/GWnRAe+sgzskU5Z+f0OalTyJPb 4W7kW+PiISSzRvAHhybsw5UidWfCRtfNF2UNa7Mr05DOEZn8SmzoWkQrgFwCxEisxfk74kNrX CyXOhcGOwaUXalqU9gcJHDqm+RYEj3jgtMIgmZlIOa7xKT+0qf4sKqVQbtzOTeE8lpnwYRnxo hjrm3aKOAeHnCOdgTahJg32vBUbgL6JmhArdrPKYx7mq110onCA/XN3c5dNPhyqcyreHVZy2t t0D7OIqmpM4cqx5vMLi1u/M9SZn7IqgMek+DccWLuJ8AyZ2EsucfjH79kGGs5mEsxt1g5WeOy h86QRqqJPwaCWeI4hpetQOHvGhi3dtsjS/v0Mqq1OsvHgnpNitV632ww9tL/9s517bcs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --bCpfKaWkxsM5b5VKLA5gsBtgEXP9IlQuu Content-Type: multipart/mixed; boundary="TNDVnvs1irS1Fo21BMbCihm6hpUFI0jJ9" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: bug-gnu-emacs@gnu.org Message-ID: <578C993D.10507@gmail.com> Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> In-Reply-To: --TNDVnvs1irS1Fo21BMbCihm6hpUFI0jJ9 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-07-18 06:41, Drew Adams wrote: > Even providing a functional-programming definition of `reduce' is > better than just describing it in abstract terms, if we can't come > up with a more down-to-earth description. What about adding a few examples? Something like this maybe? (cl-reduce f '(1 2 3 4 5)) =E2=86=94 (f (f (f (f 1 2) 3) 4) 5) (cl-reduce f '(1 2 3 4 5) :initial-value 0) =E2=86=94 (f (f (f (f (f 0 1) 2) 3) 4) 5) (cl-reduce f '(1 2 3 4 5) :from-end t) =E2=86=94 (f 1 (f 2 (f 3 (f 4 5)))) (cl-reduce f '(1 2 3 4 5) :from-end t :initial-value 0) =E2=86=94 (f 1 (f 2 (f 3 (f 4 (f 5 0))))) --TNDVnvs1irS1Fo21BMbCihm6hpUFI0jJ9-- --bCpfKaWkxsM5b5VKLA5gsBtgEXP9IlQuu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXjJlCAAoJEPqg+cTm90wjkx0QAIawX6iGOh8lpsx+TVZO2ey5 WE0g0+ShF1qo9rJ/BziPOPpIlo68JJTcze4SQ7tgD6SK4dnjSHWmjAQeKhM4vQdY MnoCg3Kw6CVX8D6zjJutr+2zMfAlcXFxXFcvamHeUzazE+4aNuwHmtqi2LNidExd JSFFm4W7wgdUFbCEYU/+KXDcrSjmh9q3mllxsJY4t5Zpe4xOkCkEn1WKh1m9oUK0 nE35xBoDKU+RfCeAcavhGqMnHH29UkDISvw0MlbeRvEbez09ASr2CFAGuKFIvb+5 a2rFZCDWZ5Q4skHghyY3MXdIY+q9f18CGbeGgmtiU6cNRPCSNs8KKV1q18D1tKAa axwULdlHa6Ye9FNDBLGdLAXb8XfRO2GF8cjpWKo8Fanftf9hLtnxbCEBKD8XxZS1 Wfii80M34ziHVo8TLdD8dxs7wAaSws4sywvEJVsETbbEzKpALrIamSDefrUE5yOM eSgRNhRMRjlxBibuO9nOMbtrGO32Gs/Qug9gGTCKws39qni7IKUCPqkNJ121EakA fSnta3QWNF8ZJvqZ2mqWgaM02PdHdATtYIjH0o78KfNsGgXqu26z7wUw54D+kqjn 6RNsIZXQQwGcDLQ7wnVqEFxUGsva7aT9C0zePX4MSeVHAxgLLpOQ58TwnrweMGNl 65kZAu/V6/yreU7yiRqT =txYh -----END PGP SIGNATURE----- --bCpfKaWkxsM5b5VKLA5gsBtgEXP9IlQuu-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 08:19:17 2016 Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 12:19:17 +0000 Received: from localhost ([127.0.0.1]:55077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP7W1-0004ZA-0M for submit@debbugs.gnu.org; Mon, 18 Jul 2016 08:19:17 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:56145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP7Vz-0004Z3-LZ for 24014@debbugs.gnu.org; Mon, 18 Jul 2016 08:19:15 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8A317205EB; Mon, 18 Jul 2016 08:19:13 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Mon, 18 Jul 2016 08:19:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=nXhdYOPdYPnt8tldWOkmUenT+ac=; b=ob6gw FbqYCneFlFnTEIYU+ob9SDbvXtyRPSLKPnMk+f4oOH6ehVvkyGJga4dz9sGDzX33 O5sCdH1jOYHMDwV3u21ILB9ITJKT6JlH//d1GjkxD0pUaBZlI1hiUp/bTB1m2Gra +Zfn9VOrfmkHDBe+W82Tn4aOINY1O6T+lgET60= X-Sasl-enc: miLhmNT7FQaAUxAszvz3faBCYi5ghxT4aHQcs7tu1eKt 1468844353 Received: from strawberry (lfbn-1-7726-61.w92-167.abo.wanadoo.fr [92.167.139.61]) by mail.messagingengine.com (Postfix) with ESMTPA id D44AFF29E1; Mon, 18 Jul 2016 08:19:12 -0400 (EDT) From: Nicolas Petton To: Drew Adams , Michael Heerdegen Subject: RE: bug#24014: 24.5; doc string of `cl-reduce' In-Reply-To: References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <878tx0hskr.fsf@petton.fr> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.95.1 (x86_64-redhat-linux-gnu) Date: Mon, 18 Jul 2016 14:19:01 +0200 Message-ID: <8737n7i1fu.fsf@petton.fr> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24014 Cc: 24014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain Drew Adams writes: > Much better, yes. This is the right level at which to describe what > it does for most programmers, IMO. I pushed a commit in master (I haven't done anything WRT the texinfo file). Nico --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: GPGTools - http://gpgtools.org iQEcBAEBCAAGBQJXjMk1AAoJECM1h6R8IHkQTKgIAM3YaFZLCZjcqMfo1iCX5F44 Z7qRlYhexhsroi4Za9UuB2SNRur1+0Y6nZifg0iJfhJ+kiuYWUJxhp4ElSGir7pq bgGhQwsbfm8+dRFnXJCGk1rhFffry5fdlBps+PfCaZcDmAlrZvgppChmon+4D/I1 y7Fyot2ng1lUdmBHaRA3wKlt+heW9muPb3+Javw/hOQnllDZq+DTCV/9C9DrN19y IXy/YKsIwKOosF1CzQQhdHIH0XPeX7ZqfXzBKjI0Ik4aBeAkRBKVNpnW4hhhIavg /0IMgWPs/njLZDUIybKPNQRnhuALegtTY0wshadSS9anHmvSFza2vfZtfWmfnHQ= =c3gT -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 10:02:53 2016 Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 14:02:53 +0000 Received: from localhost ([127.0.0.1]:55848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP98C-0007FV-BO for submit@debbugs.gnu.org; Mon, 18 Jul 2016 10:02:53 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:31061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bP985-0007FB-Jl for 24014@debbugs.gnu.org; Mon, 18 Jul 2016 10:02:46 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6IE2YqX018157 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 14:02:34 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u6IE2XTv019090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 14:02:34 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u6IE2Veo031559; Mon, 18 Jul 2016 14:02:32 GMT MIME-Version: 1.0 Message-ID: <791de973-6bb2-4bd3-a375-b6866e594ad2@default> Date: Mon, 18 Jul 2016 07:02:30 -0700 (PDT) From: Drew Adams To: =?utf-8?B?Q2zDqW1lbnQgUGl0LS1DbGF1ZGVs?= , 24014@debbugs.gnu.org Subject: RE: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <578C993D.10507@gmail.com> In-Reply-To: <578C993D.10507@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: userv0021.oracle.com [156.151.31.71] X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 24014 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) > > Even providing a functional-programming definition of `reduce' is > > better than just describing it in abstract terms, if we can't come > > up with a more down-to-earth description. >=20 > What about adding a few examples? Something like this maybe? >=20 > (cl-reduce f '(1 2 3 4 5)) > =E2=86=94 (f (f (f (f 1 2) 3) 4) 5) >=20 > (cl-reduce f '(1 2 3 4 5) :initial-value 0) > =E2=86=94 (f (f (f (f (f 0 1) 2) 3) 4) 5) >=20 > (cl-reduce f '(1 2 3 4 5) :from-end t) > =E2=86=94 (f 1 (f 2 (f 3 (f 4 5)))) >=20 > (cl-reduce f '(1 2 3 4 5) :from-end t :initial-value 0) > =E2=86=94 (f 1 (f 2 (f 3 (f 4 (f 5 0))))) LGTM - except that f should be quoted as an arg to `cl-reduce'. E.g. (cl-reduce 'f '(1 2 3)). And a shorter list makes things a tiny bit simpler: (1 2 3). (And I'm not crazy about the too-short double arrow, personally.) From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 12:03:26 2016 Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 16:03:26 +0000 Received: from localhost ([127.0.0.1]:55902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPB0w-0001jZ-0x for submit@debbugs.gnu.org; Mon, 18 Jul 2016 12:03:26 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:58374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPB0u-0001jK-Dz for 24014@debbugs.gnu.org; Mon, 18 Jul 2016 12:03:24 -0400 Received: from [192.168.1.82] ([109.24.225.43]) by mrelayeu.kundenserver.de (mreue004) with ESMTPSA (Nemesis) id 0MMJXF-1bQWKb4Ajl-0085wh; Mon, 18 Jul 2016 18:03:13 +0200 Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' To: Drew Adams , 24014@debbugs.gnu.org References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <578C993D.10507@gmail.com> <791de973-6bb2-4bd3-a375-b6866e594ad2@default> From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Message-ID: <578CFDB4.1050302@gmail.com> Date: Mon, 18 Jul 2016 18:03:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <791de973-6bb2-4bd3-a375-b6866e594ad2@default> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WSkXguMGMmo3VATpfpUFhv31CBg3krvQf" X-Provags-ID: V03:K0:eJm6o5QxQlm2n5qUuEadsadg3nWosqh+0txModDUwNTELqxeabl DbgQMAAw5T5UFDHPrkiAd8YCULGslDgap2I3FPiPQxwfmZdAhUOpquGzIL/Q6XKsPyZK2I3 L6/uY80DYnXV2sJpXf4jNGxtCKPv0zl10Lur0nSw2YLnXRAmsBoBwoawaPWc1RRpoNgxYzH /BINg5wGCSd8H6k5tbkvA== X-UI-Out-Filterresults: notjunk:1;V01:K0:j2DTS7mLjgU=:WdL9OXXfvi3i8yWVFpNVrR fPo9UtYchtE3IWvWSTCoIbK00PHBoPAZt704ld1R27BjlgVKx5FtVp53dlq6nVdyHEwtmJMVu P4GPzEaaBCQWCoXTB0P4QS2gU2+jvTbKeWdtp7k/R1Kh2A0EITNi2uArE1Qob10Lbl+rTNkaV 1VC/trF0FB9v0YeLzBf5JTmMoqS+uRcUcZ9BWuZY1rVYRIDLyFn4oJc6D4mgo91IQUuC0ug9y 1nV+JuLC+HLhlY0BanZaZvi4WNBuR/AfqUi1IKpFo9s7EzXRhTZkDzHeRX3gTT63/c6adRhzU pcCydX1P4eesLwNqvtxQtH+FWEVz0xpoG9mEEPq9/1eQi69JRYMmgelsZ346AIPmQGpTJzFeV X/MkDxya8q8fHg48haDiMClS1jchLpqFYEn+XPpr4x4pl1dQ47eKFPztP92uwgN41dNATWzV7 /0fY9TKTActAAHDkGdx+cA0X3KA54p70g6GcoirJyGOhlqftFptmSk3IUn3NNUk/moFccfGF0 0bCEshSVr0D6pUDDAI0hsY5ZEc2NW3Gi/xEals1ggvg4X61UHmJLF3hWhSywEjdJ35PoFS0Xl ksxciOfyOmK/49gFRFnTRZCkZHXzWL1Idi0F1B1K/33kNcA0/gMhGfow7vTXZsOqt2+V/SQiL ZZLGhtVohGz3QIuWOd44q5t+VU8YWlW9lrd2nskK7r3j62O74kLBsL0EXKmXy+mJhuNs= X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 24014 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WSkXguMGMmo3VATpfpUFhv31CBg3krvQf Content-Type: multipart/mixed; boundary="6k1geo4x26TLedBL7RPSWcTFGjIqKD253" From: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= To: Drew Adams , 24014@debbugs.gnu.org Message-ID: <578CFDB4.1050302@gmail.com> Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <578C993D.10507@gmail.com> <791de973-6bb2-4bd3-a375-b6866e594ad2@default> In-Reply-To: <791de973-6bb2-4bd3-a375-b6866e594ad2@default> --6k1geo4x26TLedBL7RPSWcTFGjIqKD253 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016-07-18 16:02, Drew Adams wrote: >>> Even providing a functional-programming definition of `reduce' is >>> better than just describing it in abstract terms, if we can't come >>> up with a more down-to-earth description. >> >> What about adding a few examples? Something like this maybe? >> >> (cl-reduce f '(1 2 3 4 5)) >> =E2=86=94 (f (f (f (f 1 2) 3) 4) 5) >> >> (cl-reduce f '(1 2 3 4 5) :initial-value 0) >> =E2=86=94 (f (f (f (f (f 0 1) 2) 3) 4) 5) >> >> (cl-reduce f '(1 2 3 4 5) :from-end t) >> =E2=86=94 (f 1 (f 2 (f 3 (f 4 5)))) >> >> (cl-reduce f '(1 2 3 4 5) :from-end t :initial-value 0) >> =E2=86=94 (f 1 (f 2 (f 3 (f 4 (f 5 0))))) >=20 > LGTM - except that f should be quoted as an arg to `cl-reduce'. > E.g. (cl-reduce 'f '(1 2 3)). >=20 > And a shorter list makes things a tiny bit simpler: (1 2 3). >=20 > (And I'm not crazy about the too-short double arrow, personally.) I wasn't sure about the sort list; I actually found things more confusing= that way. Should this go in the ELisp manual, or in the docstring? No strong feelings about the double arrow, and fine with me for quoting f= =2E --6k1geo4x26TLedBL7RPSWcTFGjIqKD253-- --WSkXguMGMmo3VATpfpUFhv31CBg3krvQf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXjP20AAoJEPqg+cTm90wj5rIQAJZhOg/NvbUzl6J/NCj5QAyi 6aQEij9n0xeHF4HgCiomAb6g1gmoyWVr6vF07f+4KZDg33QNYhJc/bv8xK7cZF9G ivda00weezY3TmNR5FZg31yrW3Shz14qUAm05TKNk+XYPjpFapwaCt4huXnCTcVN FNbI+y253IokSdmhQZ7yTox/jIRdG5ab2qBXgsydWmk4MZ0veIfSZlFMKsi3XNZS BeurwxezEFYsA/1+0R2L9slXgDVv2VfY2moy8g3/6Y2lvh7JS7n17NcgYPew2m8e BsP/aQGqCSPAT0NrJrq3ypw7un2iAx/857U/DKzV/hXU067rwA8kFmgY6K1SZ+Uf TW2f4z9iOxex9EAXUf7P2kVBS579/1akSzO8bfGkrf98YKz7xYKkIrCTH6SEGL1a MxVnDwqGGW1VvNdp1P9P93xff5sboBCn3fU0+uHoMXhm2ichPOvqnCySOZnIijbG BWcaV6LEWsus3c4+95vTW2tg7rLEKpUP8zQo1XU/VMvRmcb5HFvKX5bG8c/6Za4T bY83WR3lQpRON+cdd8yYQFuBCxJgsO1Ph+Vic4ya1HLlneCcU4gT9hmBwDDUEj5B fnwuwKbkUgEZdC4iLo0cExbgT2cvNzbyjq0Jo3haVPI8/aYhRlcKP/x8b26xhISn lUq7fdV4GeJA1oG7TCPc =YVhg -----END PGP SIGNATURE----- --WSkXguMGMmo3VATpfpUFhv31CBg3krvQf-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 18 13:29:07 2016 Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 17:29:07 +0000 Received: from localhost ([127.0.0.1]:55961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPCLr-0003k7-M4 for submit@debbugs.gnu.org; Mon, 18 Jul 2016 13:29:07 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:27769) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bPCLo-0003jb-Ak for 24014@debbugs.gnu.org; Mon, 18 Jul 2016 13:29:06 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u6IHSvZa032721 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 17:28:57 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id u6IHSv9i020849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Jul 2016 17:28:57 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u6IHSjW9019524; Mon, 18 Jul 2016 17:28:51 GMT MIME-Version: 1.0 Message-ID: <0c016a2e-daa4-48a8-9bb0-91b66a1ea7d7@default> Date: Mon, 18 Jul 2016 10:28:44 -0700 (PDT) From: Drew Adams To: =?utf-8?B?Q2zDqW1lbnQgUGl0LS1DbGF1ZGVs?= , 24014@debbugs.gnu.org Subject: RE: bug#24014: 24.5; doc string of `cl-reduce' References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <578C993D.10507@gmail.com> <791de973-6bb2-4bd3-a375-b6866e594ad2@default> <578CFDB4.1050302@gmail.com> In-Reply-To: <578CFDB4.1050302@gmail.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 24014 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.6 (---) > I wasn't sure about the s[h]ort list; I actually found things more > confusing that way. I wonder why? But OK by me not to shorten. > Should this go in the ELisp manual, or in the docstring? Doesn't matter to me. Maybe the manual is better. And isn't the CL manual the proper manual, not the Elisp manual? IMHO, it would help if manual entries for Common-Lisp emulation stuff had links to the most relevant CLTL2 sections that specify it. E.g., in this case, our CL manual would point here: https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node143.html. It is appropriate for our CL doc to both (1) point to the Common-Lisp spec for the corresponding thingy and (2) point out any differences between our emulation and the thing it emulates. IMHO, not doing this is not doing our job properly, not helping Emacs-Lisp users use our CL emulation. > No strong feelings about the double arrow, and fine with me for quoting f= . =20 Not quoting f is not an option. If f is a variable bound to a function then (f a b c) raises an error. (This is not Scheme.) (setq b #'car) (b '(1 2 3)) Symbol's function definition is void: b If b is an fboundp symbol then (b '(1 2 3)) =3D> 1. When you pass a function-valued argument to `cl-reduce' it is the boundp value of that _variable_ (symbol arg) that is passed, not the fboundp value of the symbol arg. The only thing that works a bit like what a Scheme user might expect in this regard is the use of a lambda at the head of the list: ((lambda (xs) (car xs)) '(1 2 3)) =3D 1. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 23 13:32:42 2021 Received: (at 24014) by debbugs.gnu.org; 23 Oct 2021 17:32:42 +0000 Received: from localhost ([127.0.0.1]:37087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meKss-0002Ja-1h for submit@debbugs.gnu.org; Sat, 23 Oct 2021 13:32:42 -0400 Received: from mail-pj1-f52.google.com ([209.85.216.52]:43871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1meKsn-0002Io-0S for 24014@debbugs.gnu.org; Sat, 23 Oct 2021 13:32:38 -0400 Received: by mail-pj1-f52.google.com with SMTP id k2-20020a17090ac50200b001a218b956aaso1068492pjt.2 for <24014@debbugs.gnu.org>; Sat, 23 Oct 2021 10:32:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=Ml3B+5Y2mCGFH1raRS6mh+d1kEJO+vf6Y+HUsqYpuw0=; b=xKdQu6ZrSwKdU6vmDKa9NvFjobzEg9LYra9FZLQLyiWAEby6zjaOWO/LBuUxfDMOe8 r5rg/ynNwuArwe3A9TFv4lsuExCoI0s7prs7B5StNtnHdNiN2+3rjQfytYNDLJL6urHW lTyN1cQgroBaq4UIWaHegyeqQj4EZIpaSBXRoKC8qRSBovfvjLc7MYbhq2ngQwiJpMRk ERqtspmiSjsN1p6buPYZVzH/dAo8AwIo32czlAY/Rf5HqV4WA+4VpGOLYeydiAdBZoGz CJx6jKn4V/kPJyY63eSE4v2dUbr8PtlBqYfi7Low81FEtBBolSmB1xdaeZCyg4msIfg5 rPQQ== X-Gm-Message-State: AOAM532Y1QrjdGkm7zRSX0Q3JP2kX+oE9mq+fwFaYeDLdoO29zBRvZAI mKs3T6ixcsTHEIhb819nV5lLGr9WsaJBbuMtxJxFw00CIQs= X-Google-Smtp-Source: ABdhPJz3lyPIDswgt0gnEbAyQ1m4dXcWbvijeCVyrKoUJhiXfS1Dx/mOz+diVGP5JMzwUQ4bN/0ALSf1AmAwH5MY4e0= X-Received: by 2002:a17:90a:d917:: with SMTP id c23mr1393060pjv.133.1635010351400; Sat, 23 Oct 2021 10:32:31 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 23 Oct 2021 10:32:31 -0700 From: Stefan Kangas In-Reply-To: (Drew Adams's message of "Sun, 17 Jul 2016 21:44:50 -0700 (PDT)") References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <878tx0hskr.fsf@petton.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Date: Sat, 23 Oct 2021 10:32:31 -0700 Message-ID: Subject: Re: bug#24014: 24.5; doc string of `cl-reduce' To: Drew Adams Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 24014 Cc: Michael Heerdegen , Nicolas Petton , 24014@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) close 24014 28.1 thanks Drew Adams writes: >> >> Please state in the doc string what the function does. IOW, >> >> explain/describe/specify what "reduce" means. Do not suppose that Emacs >> >> Lisp users are all familiar with functional programming etc. >> >> The documentation of `seq-reduce' is probably not perfect, but at least >> it tries to explain what reducing means: >> >> Return the result of calling FUNCTION with INITIAL-VALUE and the >> first element of SEQUENCE, then calling FUNCTION with that result and >> the second element of SEQUENCE, then with that result and the third >> element of SEQUENCE, etc. >> >> If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called. > > Much better, yes. This is the right level at which to describe what > it does for most programmers, IMO. Nicolas updated the docstring, and I have now done the same change in cl.texi on the emacs-28 branch (commit 43914ab01f). It is the same text as above, just formatted for texinfo, so it should be understandable to us mere programmers. I'm consequently closing this bug report. From unknown Sat Jun 21 10:32:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 21 Nov 2021 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator