From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#34852: 26.1; seq-intersection ignores nil as element Date: Fri, 15 Mar 2019 15:55:58 +0000 Message-ID: <877ed0rv1t.fsf@tcd.ie> References: <87zhpxabn3.fsf@tcd.ie> <87va0lmwlg.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="223076"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Michael Heerdegen , Nicolas Petton , Stefan Monnier , 34852@debbugs.gnu.org To: "Miguel V. S. Frasson" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 15 17:07:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4pMb-000vte-06 for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Mar 2019 17:07:17 +0100 Original-Received: from localhost ([127.0.0.1]:58066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4pMX-0003Oi-5g for geb-bug-gnu-emacs@m.gmane.org; Fri, 15 Mar 2019 12:07:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4pGH-0006MB-Pb for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2019 12:00:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4pCh-0007FT-0q for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2019 11:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60084) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h4pCg-0007FC-It for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2019 11:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h4pCg-0006u6-Gp for bug-gnu-emacs@gnu.org; Fri, 15 Mar 2019 11:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Mar 2019 15:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34852 X-GNU-PR-Package: emacs Original-Received: via spool by 34852-submit@debbugs.gnu.org id=B34852.155266536926434 (code B ref 34852); Fri, 15 Mar 2019 15:57:02 +0000 Original-Received: (at 34852) by debbugs.gnu.org; 15 Mar 2019 15:56:09 +0000 Original-Received: from localhost ([127.0.0.1]:45392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4pBo-0006sI-Nt for submit@debbugs.gnu.org; Fri, 15 Mar 2019 11:56:09 -0400 Original-Received: from mail-wr1-f41.google.com ([209.85.221.41]:43456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h4pBm-0006ri-Un for 34852@debbugs.gnu.org; Fri, 15 Mar 2019 11:56:07 -0400 Original-Received: by mail-wr1-f41.google.com with SMTP id d17so10096800wre.10 for <34852@debbugs.gnu.org>; Fri, 15 Mar 2019 08:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=aacI+iy1RXZzseII74H2ogsttGJ1SAiiB6mwzlVAV8A=; b=v2IAiCaL7/j6cyBdP2E6MEmaLZWZcfUfXTw1gmRJsIMuBpKdpq/vb3o0skulydOYND ubRjOYuWZH7fuN9oVN5oTOi3JfH2hu6pQuCGjLpPnNUf0BVVDHf2Zw43bMPXKmnqMFnd rfZXkYMqP0FK0Ap6dr6hoQgOB1QlYOh8KYUd87A55Mgkz7qkGaAvD6ksCyM82IuMQm9P 31C94mv09jl+VqZUyZILLKJL8a2BuA8kS6nx+l8tosfA5DoKdwbo0gQHGxVnFve3pgBi tC7prndgqX9rBV1muSierFk3AjRsJxZUM00Dj79KcnLQdUuFtXtC7KmZMQdymepMr/BS M97Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=aacI+iy1RXZzseII74H2ogsttGJ1SAiiB6mwzlVAV8A=; b=AKas2U/jbRIakiIAnJ2HLx5ZpeK4yfmJ7p4jgz/7V5al4YZsJDLeTskhv1SmNvlQgh BkN+OTWE4EQBBnnudtBwcGOKciEbrD8X7Wpmj+4MowNFB3cyJLry3AimD60ErDT3Z6P8 32qK8YcorB2tXL/s3BJJHHi5v2kXzKtlIIuQdHbICOwf885plOjBESe5ksAxbeyHQrO6 BxmuTM08H/UQeKupwKgeHkaELSZpFZ1nLn5XKYjDeC/KMORvfqiHzk9iKbVqlNeRDIhg 6zPSh94cnRLpIwYVrkXezUZ8auxK6xt3SVdsQJ/gYJeUk5liu/N8M+u3eMMKAYTEVGIE roog== X-Gm-Message-State: APjAAAWd8UssK7pyigDDtwiQ6+HKFhGtm75M13HVGDtdRCSgEfn4apfo sXU/rN6nt508IYNHj5lbZv/FkA== X-Google-Smtp-Source: APXvYqzGS53C3T//zASyWvMlyJ1Rw8s8AEFZJfxKU0wEjIOyzc7AeUvxrG1NJVR+7QMCNvr0lFYoTw== X-Received: by 2002:a5d:4750:: with SMTP id o16mr2898113wrs.238.1552665361035; Fri, 15 Mar 2019 08:56:01 -0700 (PDT) Original-Received: from localhost ([163.172.211.46]) by smtp.gmail.com with ESMTPSA id 3sm4130167wrk.68.2019.03.15.08.56.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 15 Mar 2019 08:56:00 -0700 (PDT) In-Reply-To: (Miguel V. S. Frasson's message of "Thu, 14 Mar 2019 16:08:36 -0300") 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: 209.51.188.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:156390 Archived-At: "Miguel V. S. Frasson" writes: > In any case, of another implementation for seq-intersection or not, I > think that the solution from Stefan should be implemented anyway > because > > * it makes seq-contains provide a useful return value when ELT=nil, so > it is a good exception; If ELT=nil, seq-contains currently returns nil > anyway; Special-casing nil invalidates any benefits of returning the element found, as it conflates nil and t and is inconsistent with other non-nil values. If seq-contains is to be made a proper predicate that continues returning the element found, then the best proposal so far has been Michael's[1], namely to return (list ELT). The alternative is to simply return a boolean, rather than the element found, but this is lossier than Michael's suggestion. [1]: https://debbugs.gnu.org/34852#68 -- Basil