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: Tue, 08 Sep 2015 08:36:22 -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> <87h9n5mloa.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441715821 7247 80.91.229.3 (8 Sep 2015 12:37:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Sep 2015 12:37:01 +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 14:36:50 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 1ZZI8h-0000OH-7l for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 14:36:43 +0200 Original-Received: from localhost ([::1]:33689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZI8g-00040k-P4 for ged-emacs-devel@m.gmane.org; Tue, 08 Sep 2015 08:36:42 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZI8R-00040W-7Q for emacs-devel@gnu.org; Tue, 08 Sep 2015 08:36:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZI8N-0004z4-V0 for emacs-devel@gnu.org; Tue, 08 Sep 2015 08:36:27 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:38662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZI8N-0004yq-SC for emacs-devel@gnu.org; Tue, 08 Sep 2015 08:36:23 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCy0HEhQYDSSINwjPIwEBAQcCAR+LOoUFBwqEIwWzP4FFI4FmJByBbiKCeAEBAQ X-IPAS-Result: A0AsEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIwULCy0HEhQYDSSINwjPIwEBAQcCAR+LOoUFBwqEIwWzP4FFI4FmJByBbiKCeAEBAQ X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162891243" Original-Received: from 206-248-160-149.dsl.teksavvy.com (HELO pastel.home) ([206.248.160.149]) by ironport2-out.teksavvy.com with ESMTP; 08 Sep 2015 08:36:22 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 3D73D6040C; Tue, 8 Sep 2015 08:36:22 -0400 (EDT) In-Reply-To: <87h9n5mloa.fsf@petton.fr> (Nicolas Petton's message of "Tue, 08 Sep 2015 09:09:57 +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:189701 Archived-At: > Can you elaborate on why you think it's not worth it? > IMO, finding an element in a sequence is a very common operation, Conceptually, yes, but if you take into account the details of how you specify which element you want, as well as what you want to do with it, then in most cases, I think the code ends up just as simple with seq-some as with seq-find. And using seq-some doesn't have the weird nil corner case. And defining seq-find as I did means it's always less efficient. And defining seq-find more efficiently means code duplication. Stefan