From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simen =?iso-8859-1?q?Heggest=F8yl?= Newsgroups: gmane.emacs.devel Subject: Re: seq-some-p and nil Date: Tue, 22 Sep 2015 19:17:52 +0200 Message-ID: <1442942272.3270.1@smtp.gmail.com> References: <1441295429.4215.0@smtp.gmail.com> <87vbbrl2ai.fsf@petton.fr> <1441907170.4222.0@smtp.gmail.com> <87y4gdylde.fsf@petton.fr> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-nFNEAYm4uybjoEL1H5ER" X-Trace: ger.gmane.org 1442942302 17180 80.91.229.3 (22 Sep 2015 17:18:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Sep 2015 17:18:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Nicolas Petton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 22 19:18:15 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 1ZeRCg-0004Jh-17 for ged-emacs-devel@m.gmane.org; Tue, 22 Sep 2015 19:18:06 +0200 Original-Received: from localhost ([::1]:41689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeRCf-0007Ep-Ih for ged-emacs-devel@m.gmane.org; Tue, 22 Sep 2015 13:18:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeRCb-0007CW-G9 for emacs-devel@gnu.org; Tue, 22 Sep 2015 13:18:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeRCW-0004QS-Fd for emacs-devel@gnu.org; Tue, 22 Sep 2015 13:18:01 -0400 Original-Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:34418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeRCW-0004Q7-8Y for emacs-devel@gnu.org; Tue, 22 Sep 2015 13:17:56 -0400 Original-Received: by lahg1 with SMTP id g1so21429387lah.1 for ; Tue, 22 Sep 2015 10:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version:content-type; bh=e2dTp2wF9o5bNAvrsbZgISaHR6nQzJQqxOm4lFum7cg=; b=h1yVx/UdjB0SvmchwhuPTtnL0t4D8BrR7LF5xNkmsmZmeKd2V4Oqg+jHwr2NTqlTnr lOgCDXxLi49+Gr0o++IKoRvchXxWjPjkk2Sn1gONAnB6iiHQO4VuLHq0WMvZsrayfGrE 1mBKXKk9ZCOUVistyukC2Y9PhtVdZ3KIiQhV8IIPtiKN+YwLbHSm4OgQyy26vTkyD/rP vz5KOYo5P6qFjozJLyBY1DEoaotgsKOgxa/luJVKXAW0ulH4XV+4U33UENvTs/LMYVLa iGF6anMjX2QuePwD5+C624OleVAqu2SB534n7j4dUGR5w6NMQpfvYQFNe1fDLMqRpHzx BXOQ== X-Received: by 10.25.144.78 with SMTP id s75mr2975233lfd.116.1442942275052; Tue, 22 Sep 2015 10:17:55 -0700 (PDT) Original-Received: from [192.168.100.7] (cm-84.210.143.4.getinternet.no. [84.210.143.4]) by smtp.gmail.com with ESMTPSA id lh1sm324310lab.24.2015.09.22.10.17.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2015 10:17:54 -0700 (PDT) In-Reply-To: <87y4gdylde.fsf@petton.fr> X-Mailer: geary/0.10.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::236 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:190249 Archived-At: --=-nFNEAYm4uybjoEL1H5ER Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On Fri, Sep 11, 2015 at 12:12 AM, Nicolas Petton =20 wrote: > Simen Heggest=C3=B8yl writes: >>=20 >> While we're on it, wouldn't seq-some be even more powerful if it >> guaranteed to return the value from the first matched element? Or >> would that somehow be difficult for some kinds of seqs? >=20 > I added another function seq-find that does just that. >=20 > Cheers, > Nico > -- > Nicolas Petton > http://nicolas-petton.fr Ah, sorry, I should have been clearer. What I meant was that it could guarantee to return the *first* non-nil value that resulted from applying the predicate, like in CL. So for instance, (seq-some #'1+ '(1 3 5)) could guarantee to return 2, not 4 or 6. (And still (seq-some #'null '(1 nil 2)) =E2=87=92 t, unlike seq-find). -- Simen = --=-nFNEAYm4uybjoEL1H5ER Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Fri, Sep 11, 2015 at 12:12 AM, Nicolas Petton <nicolas@petton.fr= > wrote:
Simen Heggest=C3=B8yl <si= menheg@gmail.com> writes:
While we're on it, wouldn't seq-some be even more powerful if it guaranteed to return the value from the first matched element? Or would that somehow be difficult for some kinds of seqs?
I added another function seq-find that does just that. Cheers, Nico
--=20
Nicolas Petton http://nicolas-petton.fr

Ah, sorry, I should have been clearer. What I meant = was that it could
guarantee to return the *first* non-nil value t= hat resulted from
applying the predicate, like in CL.
<= br>
So for instance, (seq-some #'1+ '(1 3 5)) could guarantee to = return 2,
not 4 or 6.

(And still (seq-so= me #'null '(1 nil 2)) =E2=87=92 t, unlike seq-find).

-- Simen
= --=-nFNEAYm4uybjoEL1H5ER--