From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Woodbury Newsgroups: gmane.emacs.bugs Subject: bug#57273: Improve `cl-reduce` docstring Date: Thu, 18 Aug 2022 18:59:42 +0900 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------X52CD7AEEStZMUzO9jyGBFcM" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 To: 57273@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 18 12:12:00 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oOcVK-0004HS-3c for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Aug 2022 12:11:59 +0200 Original-Received: from localhost ([::1]:40076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oOcVJ-0004kk-3r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Aug 2022 06:11:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOcJm-0006WH-V3 for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 06:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35927) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oOcJm-0004YG-JQ for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 06:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oOcJm-0002Uy-F5 for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 06:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Colin Woodbury Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Aug 2022 10:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57273 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16608167949557 (code B ref -1); Thu, 18 Aug 2022 10:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Aug 2022 09:59:54 +0000 Original-Received: from localhost ([127.0.0.1]:53909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOcJd-0002U4-Ka for submit@debbugs.gnu.org; Thu, 18 Aug 2022 05:59:53 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOcJc-0002Tv-3r for submit@debbugs.gnu.org; Thu, 18 Aug 2022 05:59:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOcJb-0006HK-S0 for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 05:59:51 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:42895) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOcJZ-0004VW-Fq for bug-gnu-emacs@gnu.org; Thu, 18 Aug 2022 05:59:51 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7683732009EB for ; Thu, 18 Aug 2022 05:59:45 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 18 Aug 2022 05:59:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fosskers.ca; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t= 1660816784; x=1660903184; bh=m5hb3Rlo7PpZ+T0WX7h6TU+hx4BHpZoR588 WhhTGBXw=; b=XlowlvwkZDxX+t3c3O9rJQa916RZNYICMIu9pODVwsd1TDTbGVn 0F7CMGNWXCYPjV8ZzN0Zaf/fMzm88W6hizFRlxZzXeOlPzaqMHW2r2LAcaog21xc ZI+R+MxdDkt7MQ9WlanhBzgxzTbfSnX7QMAtjZ5P13zYDBwEB6T/JcoK+bYY5F8e syEa37+OdKdGsYgjYmqInYqVM/AMFdyhqaMMwn48OsccyD9mTYQGpteyEE8PQWs9 DBt3GIiRY6k0YMMm/vGN/k+NWjAONP5EpHrhuCWLsEkcA6uowckZvjpjSwSKE2IN OfRkNAN3CgM7Xzum63T7/uCKNm0NIm86byg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1660816784; x= 1660903184; bh=m5hb3Rlo7PpZ+T0WX7h6TU+hx4BHpZoR588WhhTGBXw=; b=g MbgStX8XWx3eSJ+tcwWRM4EJ2vPQGGFC8sLBX9+sLpE7i+u7CPN4jjlia98ELAvt SIOFdRtt9mjrNA+ua0QbygcOi2UjOcoiawpUAl1M/eTrXPvEuLnX52+J+YcDaCBe J4EK2rJ3DmcOuOb+xZPND7OT+0dmeFZzcaJAiWHI+hQId581YULR3myVdVIiU+Rc Lew6/dXUsD7+dHSdQQQncB49xNsjNXXOI33+0SUIuqBxOFy2fwHXGv5FLu8XJ5PJ 7c4eZUcPWS7T6rvPlm7U6KTqUVssjhK//ExBjaseous/DhQoGkUYZWSAI0rkTG1O 7oIijUCPEcnAp4+HtDSYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehkedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegtkfffgggfvffhufesmhdtreertd efjeenucfhrhhomhepveholhhinhcuhghoohgusghurhihuceotgholhhinhesfhhoshhs khgvrhhsrdgtrgeqnecuggftrfgrthhtvghrnheptdegfffffedugeetfeffueetveevhf eijeelhfetffehvedukeeiudejffehleefnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheptgholhhinhesfhhoshhskhgvrhhsrdgtrg X-ME-Proxy: Feedback-ID: iaef144a3:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 18 Aug 2022 05:59:43 -0400 (EDT) Content-Language: en-US Received-SPF: none client-ip=64.147.123.24; envelope-from=colin@fosskers.ca; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:240133 Archived-At: This is a multi-part message in MIME format. --------------X52CD7AEEStZMUzO9jyGBFcM Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit This patch expands the docstring of `cl-reduce` to mention that the order of arguments to the given lambda is flipped when `:from-end` is used. This behaviour matches "right folds" in other languages, but this fact is otherwise hidden until the user's code suddenly breaks. The order flip is technically mentioned in the cl-lib manual, but in a somewhat cryptic way. Cheers, Colin --------------X52CD7AEEStZMUzO9jyGBFcM Content-Type: text/x-patch; charset=UTF-8; name="0001-lisp-emacs-lisp-cl-seq.el-cl-reduce-Document-arg-ord.patch" Content-Disposition: attachment; filename*0="0001-lisp-emacs-lisp-cl-seq.el-cl-reduce-Document-arg-ord.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSBjMmU4ZDA0NTQ1NjY0Y2E2ZWQ2MzYzYTgwNGQ5NjA3NTg4ZjRkZjYxIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBDb2xpbiBXb29kYnVyeSA8Y29saW5AZm9zc2tlcnMu Y2E+CkRhdGU6IFRodSwgMTggQXVnIDIwMjIgMTg6NDk6NTkgKzA5MDAKU3ViamVjdDogW1BB VENIXSA7ICogbGlzcC9lbWFjcy1saXNwL2NsLXNlcS5lbCAoY2wtcmVkdWNlKTogRG9jdW1l bnQgYXJnIG9yZGVyCiBmbGlwIHdoZW4gOmZyb20tZW5kIGlzIHVzZWQuCgotLS0KIGxpc3Av ZW1hY3MtbGlzcC9jbC1zZXEuZWwgfCA0ICsrKysKIDEgZmlsZSBjaGFuZ2VkLCA0IGluc2Vy dGlvbnMoKykKCmRpZmYgLS1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