From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations Date: Wed, 28 Sep 2016 20:27:50 +0200 Message-ID: <87bmz7517d.fsf@web.de> 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 X-Trace: blaine.gmane.org 1475087313 25444 195.159.176.226 (28 Sep 2016 18:28:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Sep 2016 18:28:33 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Nicolas Petton , Emacs developers To: Yuri Khan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 28 20:28:29 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 1bpJaW-0004N5-SI for ged-emacs-devel@m.gmane.org; Wed, 28 Sep 2016 20:28:12 +0200 Original-Received: from localhost ([::1]:60557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJaV-0008UH-BD for ged-emacs-devel@m.gmane.org; Wed, 28 Sep 2016 14:28:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJaM-0008TL-A2 for emacs-devel@gnu.org; Wed, 28 Sep 2016 14:28:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpJaI-00009u-2e for emacs-devel@gnu.org; Wed, 28 Sep 2016 14:28:01 -0400 Original-Received: from mout.web.de ([212.227.15.3]:60529) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpJaH-00009R-PB for emacs-devel@gnu.org; Wed, 28 Sep 2016 14:27:58 -0400 Original-Received: from drachen.dragon ([90.186.2.35]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0M2unu-1ayB030TUE-00sget; Wed, 28 Sep 2016 20:27:53 +0200 In-Reply-To: (Yuri Khan's message of "Wed, 28 Sep 2016 10:13:33 +0600") X-Provags-ID: V03:K0:7jVrsq5dqPJZ7vmdP7DzM3yMaxcNgwRffnFckqzIn4VepGsoNko nJFaWVvsO2Pomav2VQPhTJ9BLQONB/jPo9JrMPOfYcioKzgWiGLnVj1AkVcVil2lSViavy0 uaTVlV4GGXgkdNTM1Q24s/7JtEMGnwKcKNaYHzUKuaF4i8U5p8YaR7X5emxxM0aUq668nOb vzojmA4P/JZYcdTWoNGpw== X-UI-Out-Filterresults: notjunk:1;V01:K0:5mFpbrxzMtg=:IyUsidfIuxTjgA7ULMtdc3 Ijlex9GLTpaLZylw+OIliIu5z8tXFsbfjGYvV/kX+B6N3RC1sEm5J3SF7ZP7culcTUJfck9Vy uzqzlDoRmzQOo2zFM7Ep1GAs952HL0mBzIuORoQCZyLN9XGZr2cku9+WEU8t68ASGaGwZp0t+ bLMuhDFlmNVhRpQPtfquAhouKVlU6WQQnP4aDwxb/EiuS0/LiwYDM5rhei8km4xhuChGAPvGi kNJxeqt8fF9sZLrgluI99hLAHvf/k+mMkKBY9iXWgSNnhnrlQ3daBc+Vfh95qVKmHSJ/7INZi jF8KTo8Ulxs7KLxMsmUEw9zXRTKt8X6H/dvp8eiqdv6L3GwnXbANXg1UDafXWootj4lifxULa eFNlR7rtjDLSZS34vQZvfaflLOVMIs3+7yDP+jF6hYZAUZGULenxgfqmsqevMIJCyJxyI4f3D EkhZpbhHEQPAKdBcHlsviOjNXGfZF1Ju3GtVscJe0IayaNvDv+2OJz517BPDwqYZzR1lWjQ1K geLO+d2szKwDG+4gYiQMI3pBR28AwAe3aVBaImXQZsXY3lKwwtF1ihouQ1rffdProlK3d0zrk YevKEN1fVKoE/IEB1zQ9Kgcfe96GOqUFE9KhACUrkt1W8UlfdukoyUmzywZ7MSlQrpSHkDrsa hge2jLVAhzKBAguFpsW45a+C4gVMk6ACcuFp4zTfMoTgNuq31onxJ76YfAt7O9qLzukF8AnSl iPKzoLt0DFoqXRMlxHMWWZ4/w9F78KVgi8PmUrandFyleUbubGwQLiejMwIoIIQ2dgjYsqGY X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.3 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:207871 Archived-At: Yuri Khan writes: > > [...] be the smallest common divider of what we discussed. Oops, "greatest" of course, this wasn't meant ironically, it was just late, ok? > 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. I only partly understand your objection (what do you mean with "strict in all elements"?). IMO, termination in every case is not a requirement, else, we would not have `while'. Formulating algorithms to use streams is just a way to describe loops. So I don't see why it would be a problem when stream primitives potentially don't 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. Would adding an optional argument that allows to specify an upper limit for the indexes the function looks at cover (all of) your concerns? Regards, Michael.