From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: seq-some-p and nil Date: Mon, 07 Sep 2015 18:27:02 -0400 Message-ID: References: <1441295429.4215.0@smtp.gmail.com> <87si6vl21r.fsf@petton.fr> <878u8k2vnp.fsf@udel.edu> <878u8i69ok.fsf@petton.fr> <674102d7-0e97-478a-af05-ca6d82c17c28@default> <87mvwym01x.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441664855 30246 80.91.229.3 (7 Sep 2015 22:27:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 22:27:35 +0000 (UTC) Cc: Mark Oteiza , Drew Adams , emacs-devel@gnu.org To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 08 00:27:28 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZZ4sk-0007Ol-NP for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 00:27:22 +0200 Original-Received: from localhost ([::1]:59072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ4sk-0007EK-Dz for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 18:27:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ4sX-0007EA-3P for emacs-devel@gnu.org; Mon, 07 Sep 2015 18:27:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ4sT-0003p1-TS for emacs-devel@gnu.org; Mon, 07 Sep 2015 18:27:09 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:34340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ4sT-0003nb-Q5 for emacs-devel@gnu.org; Mon, 07 Sep 2015 18:27:05 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ArEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIxALNBIUGA0kiDcIzyMBAQEHAgEfizqFBQeELQWzP4FFI4QUIoJ4AQEB X-IPAS-Result: A0ArEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIxALNBIUGA0kiDcIzyMBAQEHAgEfizqFBQeELQWzP4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162840282" Original-Received: from 206-248-160-149.dsl.teksavvy.com (HELO ceviche.home) ([206.248.160.149]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2015 18:27:03 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 2C3F56612A; Mon, 7 Sep 2015 18:27:02 -0400 (EDT) In-Reply-To: <87mvwym01x.fsf@petton.fr> (Nicolas Petton's message of "Mon, 07 Sep 2015 22:44:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:189678 Archived-At: >> Returning what FUN returned seems like a better choice. >> If you need the element matched, then you can simply arrange for FUN >> to return the element. > There is a misunderstanding here I think. > The way I see it, they are two different functions: the (new) seq-some, > and this other function that is now missing in seq, with the new > implementation of `seq-some'. I don't think so. Both functions can be one and the same. If you really want seq-find, you can define it as (defun seq-find (pred seq) (seq-some (lambda (x) (and (funcall pred x) x)) seq)) But I'm far from convinced it's worth having them both, Stefan