From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.devel Subject: Re: seq-some-p and nil Date: Mon, 07 Sep 2015 11:23:15 -0400 Message-ID: <87zj0ytfrw.fsf@udel.edu> 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 1441639444 13572 80.91.229.3 (7 Sep 2015 15:24:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Sep 2015 15:24:04 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 07 17:23:56 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 1ZYyGd-00042R-KP for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 17:23:35 +0200 Original-Received: from localhost ([::1]:57286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYyGc-0006Nx-Uw for ged-emacs-devel@m.gmane.org; Mon, 07 Sep 2015 11:23:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYyGQ-0006Nd-ST for emacs-devel@gnu.org; Mon, 07 Sep 2015 11:23:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYyGM-00033I-SB for emacs-devel@gnu.org; Mon, 07 Sep 2015 11:23:22 -0400 Original-Received: from mail-qg0-f43.google.com ([209.85.192.43]:32906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYyGM-00032K-PW for emacs-devel@gnu.org; Mon, 07 Sep 2015 11:23:18 -0400 Original-Received: by qgev79 with SMTP id v79so63968184qge.0 for ; Mon, 07 Sep 2015 08:23:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=jftvO/qR7c+9TwqURebxkB9sU87G4nruoLEHdM6gIKU=; b=euJ77hP0uNXlHTv8fQf+3lLL4eSLdR4nNWGwfshSNmP8OzDUrfJGeURaKIcr+K3xbH pMrXt4RxaRD6dzXo+liMnMOFVEorCOotT05nRBo+B+hd9DxNqdJoAx2s3rDeMOvMWWjM KbUPB2lqj2StwrFTdxfx3Cur50pXrptyafRumtYQSwCN5wijM5YECPnrI7JAwhWUt1wV adZ8xpxkH77kGfx9NnSB3OA9jSxOfnqJS8QDfApPdohugCnLfgcIssv2jbYB6uEVA7gt 31h6n1/tzq2kaxKToaLloBQyCiLjkBtCklm00o/0W0h9nu43HE6PEfaDi9yxOtFvGbXD btiw== X-Gm-Message-State: ALoCoQmaIXjEAhJzSQOpWbY1HA8cqCJTk71pHv642IXrSVK7e9Jzu9JoMha5fFj2aGPwYDuD89FQ X-Received: by 10.140.238.3 with SMTP id j3mr29228006qhc.14.1441639397587; Mon, 07 Sep 2015 08:23:17 -0700 (PDT) Original-Received: from holos.localdomain (c-73-172-248-173.hsd1.md.comcast.net. [73.172.248.173]) by smtp.gmail.com with ESMTPSA id x19sm41379qkx.32.2015.09.07.08.23.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Sep 2015 08:23:16 -0700 (PDT) Original-Received: by holos.localdomain (Postfix, from userid 1000) id 2D04768971; Mon, 7 Sep 2015 11:23:15 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon, 07 Sep 2015 11:19:29 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.192.43 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:189670 Archived-At: Stefan Monnier writes: >>> 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. Or have a function which returns the matching ELT and have seq-some and friends use said function and apply PRED to its return value.