From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: (*) -> 1 Date: Thu, 19 Jan 2023 11:06:10 +0100 Message-ID: <871qnqbyvc.fsf@gnu.org> References: <87y1q1kvdm.fsf@web.de> <87h6wpkrlq.fsf@web.de> <87zgahj7h3.fsf@web.de> <87k01kufox.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17847"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.16; emacs 30.0.50 Cc: Michael Heerdegen , help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 19 11:31:02 2023 Return-path: Envelope-to: geh-help-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 1pISCD-0004TE-2i for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 19 Jan 2023 11:31:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pISBd-0006lk-Py; Thu, 19 Jan 2023 05:30:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pISBa-0006jM-2k for help-gnu-emacs@gnu.org; Thu, 19 Jan 2023 05:30:24 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pISBX-0002AY-UG; Thu, 19 Jan 2023 05:30:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=0CK6dn11CwUvcl1UUtE4jY72WD4nhAPdL+a0+kJRQbc=; b=JrF0GG6rRS1m/W rcqjPrNUN2he2mdY7hxj836TabhrLA7YdqEDcwfaW3xH4DAh2EIbIAUvLPdfQoJ8HHuOIPhTfHZTG TiDmP3ampRSUg9QmXYh7lsFDg7AuKbmSfNmcT8fNwNnRCJib7gY1XTjuLPOSa3hVqiBg4R/24LYQ5 ye9UvhhyPfYrjwgEE7rESHLJIDegRe79f9B4SKmRG0ArEcu9+a9AkRFEFm4mIiyzqUyAeeZIZmNt4 UPXOXiqxZzFVNmBjvdC9xi8KhiLweeecDBgdVdgeoTT7ui1PjWF8f7+PaJWCI2KCZNtkmBqPFdpha 2E2WWYjHmG+uXPbuGdmA==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pISBW-0005Qh-DX; Thu, 19 Jan 2023 05:30:19 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 0396527C0054; Thu, 19 Jan 2023 05:30:17 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 19 Jan 2023 05:30:17 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddutddgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvvefuffgjkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epgfettdduiedvhfffhfefhfevhfeuvdehjeejfeelffehkeffuedthffgjeeihfegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Jan 2023 05:30:16 -0500 (EST) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142391 Archived-At: Jean Louis writes: > I look only at functions like: > > (+ (*) (*) (*)) =E2=9E=9C 3 > > which do not result that mathematically shall be sum of three > multiplications. (*) is 1 because 1 is the neutral element of multiplication. (+) is 0 because 0 is the neutral element of addition. > It is error in programming language. > > Without trying to explain it, provide Lisp function where it is > actually useful. > > Or otherwise, the research has shown so far: > > 1. nobody knows why is it useful in Lisp It's useful because you can (apply #'+ my-list-of-numbers) and get a correct result. > 2. various hypothesis have been tried out and tested. All with the > attempt to justify how (*) =E2=9E=9C 1 should be there, but none can f= ind > reason for (1), see aove. > > 3. there is no to me known piece of Emacs Lisp that would raise error > if function `*' would be made to require two arguments, as this > point (3) would lead to probable understanding of it. > > and > > 4. Function makes something out of nothing instead of raising error:=20 > (+ (*) (*) (*)) =E2=9E=9C 3 > >> Saying "I have no cars in my garage, but (*) =3D=3D> 1, so where is that >> car out of nothing?" > > Joke? It was joke. The sum of cars in your garage is (apply #'+ nil) =3D> 0 which is absolutely correct. > (+ (*) (*) (*)) =E2=9E=9C 3 > > Where is example of how it is useful? Well, replace + and * with `and' and `or' and you get the canonical disjunctive or conjunctive normal forms. And then you can use it with lists of nil/non-nil values and it will be logically correct even when an empty lists sneaks in which is essentially the constant t or nil in this context. Bye, Tassilo