From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: thunk.el: Document that thunk-force == funcall? Date: Tue, 17 Nov 2020 16:17:14 +0100 Message-ID: <871rgs3tdx.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5010"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Nicolas Petton , Stefan Monnier To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 17 16:19:37 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kf2ld-0001EK-4d for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Nov 2020 16:19:37 +0100 Original-Received: from localhost ([::1]:59750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kf2lc-0004f7-7r for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Nov 2020 10:19:36 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf2ja-0002LQ-Lo for emacs-devel@gnu.org; Tue, 17 Nov 2020 10:17:30 -0500 Original-Received: from mout.web.de ([212.227.15.14]:33447) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kf2jU-0007hP-2B for emacs-devel@gnu.org; Tue, 17 Nov 2020 10:17:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1605626235; bh=1qh4oIt533vR8IbYr+5qfiLF2E5ujSDu6QK6m+R8t8I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=dbFxvsN4TFASmHy8DFArJT254/y8xIG8s6JPE/GhwM8V17G6gnBTwkrciuckPY3P+ RbPhbIDBzpOakZIoArKhtiOd2C0qv2+FbsEQs2hki/1Dt78GFhcVsEVYvQ3ebawF9S a64BGOUV/7OtmIRkDawO+E2y9n6W6j3ojo/lcS3c= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([94.218.215.213]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N8n46-1kAZu12oTu-015qfl; Tue, 17 Nov 2020 16:17:15 +0100 X-Provags-ID: V03:K1:ty45eziSh+vZEgJXF1/bxpaN8GsXVCNHMOyN+JCqJp4bi10lDdV jFQZpoOD2XRKZ/wLuDuZFvCmyWxfFdUVRzmtZWBTsHX30TDZGN8urEpDC80S93PAkoGZtuY 78fagOv1Bv+UNuzf322oyU9mmWzl/yUvX16Y+qGMa6h0Dx2Q4pk6DpqwOYTG7GeRzVUOMlv g9Z05gMqHEkZC91R3i41w== X-UI-Out-Filterresults: notjunk:1;V03:K0:ujuh02Qec1I=:GmS61kfgPgkA3uJurynWMN wCYQblUBjyJ5na0elddOypafZIod2OsA7NnTiOBAZOpVB5lQV0prOlnWanz22AZSHUN3lsSRn uEC11CFD2/f5QybRuTtrt3rdgEjkKf+TqCgZk4Ngx6nr33huqDLf6Scit0h7/bxcklqRV5VCR cGbQf2MH72AXnpf28rEEaGNXVGmn2cBlEYyXbT14G49eQRir+Uid4FEdhOBCQPuq/yKCkdXoa ZInpUpiGhKM+uaYggbxb6GJ1iYPaT6V0Fx2TL81Ep7WFMyb43pPwbKWL6P1f9NakYpiVV9vPp k3Mi+J8vjQo/ds2eoaGHffaUPepEdaDnQROnbytysRC9RSYh/PrS4ZxmfE0CB7txGtvbyOTzE FqW20GXdxEe5Dq2V+/ueFsAc2r/JX1TiHKUfF1pNC1VMgk0BDkkDpP3Rl2QzGnoWvVaHf4vaZ YwYWEUmrTEpAHFbgHRM73EKLCNcui6+wJTQEqp9BMeNTFBdoD1a57AX9NrZ2Xkty/dC1maNIi 8bfztXsYl27nNFKymm84yWDllDV/4ZgBQ3AjjPsLq0LTdbZE4Pkzl0ePOpd8FtxMJW9rSApth zI8nTLAMHRhJ2iyzZfy2xTHllMTUZhGClzxZpN4C3xT3e7jayYzCqQza8bDFLpTBjAqnqllV7 1x2HPc8zvzZ7T6KqLuQh3+QMPpvHS+AeTH4ba76Pt9OSg7sz/FhwvKal/2qgs2kQEUazQqGjF brb7KUYjHhIQE1uKgctWvzcsIE6bxkF/yZP4/+jCzoFerhhkrP1A94waQqgjXl08ScH7ECuW Received-SPF: pass client-ip=212.227.15.14; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/17 09:29:36 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:259290 Archived-At: Hello, `thunk-force' is equivalent to `funcall' - thunks are functions. I wonder if we could/should officially document that fact? The background: because thunks are functions, one is allowed (and it is useful) to directly pass them to higher order functions e.g. as a test predicate, or bind them using `cl-flet', or `cl-letf' to a `symbol-function' place. Currently, the official solution would require to use a lambda wrapper. I have encountered this requirement several times (and using `thunk-let' was not always the solution) - thus my question. TIA, Michael.