From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Newsgroups: gmane.emacs.bugs Subject: bug#24014: 24.5; doc string of `cl-reduce' Date: Mon, 18 Jul 2016 18:03:00 +0200 Message-ID: <578CFDB4.1050302@gmail.com> References: <18e97f8d-f6f8-4b4c-9d4c-20eb8664483e@default> <87zipgmf51.fsf@web.de> <578C993D.10507@gmail.com> <791de973-6bb2-4bd3-a375-b6866e594ad2@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WSkXguMGMmo3VATpfpUFhv31CBg3krvQf" X-Trace: ger.gmane.org 1468857990 23462 80.91.229.3 (18 Jul 2016 16:06:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2016 16:06:30 +0000 (UTC) To: Drew Adams , 24014@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 18 18:06:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bPB3d-0005fX-R1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jul 2016 18:06:14 +0200 Original-Received: from localhost ([::1]:48737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPB3d-0005cM-95 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jul 2016 12:06:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPB1b-0001ZU-7C for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 12:04:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPB1W-00051j-65 for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 12:04:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43565) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPB1W-00051d-2R for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 12:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bPB1V-0001kP-KA for bug-gnu-emacs@gnu.org; Mon, 18 Jul 2016 12:04:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jul 2016 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24014 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24014-submit@debbugs.gnu.org id=B24014.14688578066673 (code B ref 24014); Mon, 18 Jul 2016 16:04:01 +0000 Original-Received: (at 24014) by debbugs.gnu.org; 18 Jul 2016 16:03:26 +0000 Original-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 Original-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 Original-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 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: <791de973-6bb2-4bd3-a375-b6866e594ad2@default> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121224 Archived-At: 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--