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 11:19:29 -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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1441639202 9423 80.91.229.3 (7 Sep 2015 15:20:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 15:20:02 +0000 (UTC) Cc: Mark Oteiza , Nicolas Petton , emacs-devel@gnu.org To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 07 17:19:55 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 1ZYyD0-0000QX-R0 for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 17:19:50 +0200 Original-Received: from localhost ([::1]:57275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYyD0-000541-Du for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 11:19:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYyCk-00052o-So for emacs-devel@gnu.org; Mon, 07 Sep 2015 11:19:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYyCg-0001Dn-Rr for emacs-devel@gnu.org; Mon, 07 Sep 2015 11:19:34 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYyCg-0001Dh-OC for emacs-devel@gnu.org; Mon, 07 Sep 2015 11:19:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ArEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIxALNBIUGA0kiDcIzyMBAQgCAR+LOoUFB4QtAQSzP4FFI4QUIoJ4AQEB X-IPAS-Result: A0ArEwA731xV/5Wg+M5cgxCEAoVVuzcJh0sEAgKBPDkUAQEBAQEBAYEKQQWDXQEBAwFWIxALNBIUGA0kiDcIzyMBAQgCAR+LOoUFB4QtAQSzP4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="162790531" Original-Received: from 206-248-160-149.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.160.149]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Sep 2015 11:19:30 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id D39DEAE11E; Mon, 7 Sep 2015 11:19:29 -0400 (EDT) In-Reply-To: <674102d7-0e97-478a-af05-ca6d82c17c28@default> (Drew Adams's message of "Mon, 7 Sep 2015 01:06:51 -0700 (PDT)") 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:189669 Archived-At: >> If the function is not supposed to return non-nil if an element is >> matched but the element itself, then would it be ok? OTOH there would be >> again no way to differentiate between no element found and nil being >> found in the sequence. 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. Stefan