From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations Date: Wed, 28 Sep 2016 10:13:33 +0600 Message-ID: References: <87twhbmwbx.fsf@web.de> <878tynl720.fsf@petton.fr> <8737onlapw.fsf@web.de> <87ziqu7ew9.fsf@petton.fr> <87mvmuxuyo.fsf@web.de> <8760tixi99.fsf@web.de> <87twh1kpem.fsf@web.de> <87y42r4d3a.fsf@web.de> <878tug9eh3.fsf@web.de> <87a8es6dcq.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1475036101 11190 195.159.176.226 (28 Sep 2016 04:15:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2016 04:15:01 +0000 (UTC) Cc: Nicolas Petton , Emacs developers To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 28 06:14:58 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bp6GN-00087e-WB for ged-emacs-devel@m.gmane.org; Wed, 28 Sep 2016 06:14:32 +0200 Original-Received: from localhost ([::1]:55887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bp6GM-0005x5-FE for ged-emacs-devel@m.gmane.org; Wed, 28 Sep 2016 00:14:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bp6Fp-0005wv-PJ for emacs-devel@gnu.org; Wed, 28 Sep 2016 00:13:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bp6Fn-0003yv-S7 for emacs-devel@gnu.org; Wed, 28 Sep 2016 00:13:56 -0400 Original-Received: from mail-lf0-x230.google.com ([2a00:1450:4010:c07::230]:33391) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bp6Fn-0003yV-KI for emacs-devel@gnu.org; Wed, 28 Sep 2016 00:13:55 -0400 Original-Received: by mail-lf0-x230.google.com with SMTP id b71so40451618lfg.0 for ; Tue, 27 Sep 2016 21:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=QLIQlZxGwSF3IGheQc9TNLepiM785IbWDmDWKjVGEuA=; b=pl00S/tI/GjNM+05q9Q0A4AWO81Nx8QfvoKhKFnxjDftow6mTvJmwYAY44C2ILzrGy v7AFeuBj8omTBZhPiwo7FXdJAylYzqQ3/2DcGai3PmdGkEPTeDZNoZca5z2BjSa0NgP3 ZD+75xzubfQxXbiT+iWR0mMVCOR35L0qQdxARh4ZAOmdYb5dXE4PcsARA258X+0p17Sd nt3AjkZdm3AvUorQ9Wt36E7C9n8KZpbokv782OSrtkL6duPwuPuro2D2jEK8MBAz6HBh BEgGBZ1jJ2N6JR98E18wvdB1daKlMhrmtQRWIxwJuDlXVmS09z5UHestlqLAwY9MY2me VbCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=QLIQlZxGwSF3IGheQc9TNLepiM785IbWDmDWKjVGEuA=; b=VS3rfiT/1ZsGAjUSjm+Mi6zlCYAzOCyuS1N6LE4E/wkeAL5PZ0DJ4XkfzPs8HXPxkl TlGdLo2h5OINOlAuWUPkpSS0TK0Yl4Bz0yRcB810XD62OLTX66Mk1nqA7ez7d0jYvy25 ETdLwZxTJsjJ6TJw5TWws1+ODY/YoymbEn5izXOWB3Q0Xi1h884TssX6mqwAY1yj51iw GXmabzspOHYbkiCEZjlR1wpGtZbi6WiWwOGMy1A3eFY9iTiUOY1XZW3dU7GIztmNRRyV APrFM2hGGrqwdeYqTR4Iz1KfzJqbKedHa12+K5HqhgQ+Djv5zJtVf+ywqZCJqm07OyMO /ZdQ== X-Gm-Message-State: AE9vXwOHPMY80dYnch9GxmbrSex2g0nvoWS92G0AkxKijkw7rQmRy5T0ElUf8hOYcHDwPGDvfm7qkIhBCdiFpA== X-Received: by 10.25.16.26 with SMTP id f26mr9215898lfi.43.1475036034334; Tue, 27 Sep 2016 21:13:54 -0700 (PDT) Original-Received: by 10.114.80.163 with HTTP; Tue, 27 Sep 2016 21:13:33 -0700 (PDT) In-Reply-To: <87a8es6dcq.fsf@web.de> X-Google-Sender-Auth: m13Q9mUJ8W7zatzJltwaw0J3Jss X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:207847 Archived-At: On Wed, Sep 28, 2016 at 8:07 AM, Michael Heerdegen wrote: > Hmm, what would you think of a function that returns the index of the > first element of a sequence that fulfills a certain predicate (actually, > there is already something similar, `seq-position', but that is meant to > find the index of an element equal to a given one)? That would, in some > sense, be the smallest common divider of what we discussed. That is a good complement to seq-position (and might be named seq-position-if). However, these are also strict in all elements up to and including the one being sought, and may not terminate. As an example, if you want a subsequence starting at the first odd number or at index 1000, whichever is earlier, (seq-drop (min 1000 (seq-position-if 'odd S)) S) will not do the right thing.