From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations Date: Thu, 9 Jun 2016 23:11:18 +0600 Message-ID: References: <87twhbmwbx.fsf@web.de> <878tynl720.fsf@petton.fr> <8737onlapw.fsf@web.de> <87ziqu7ew9.fsf@petton.fr> <87mvmuxuyo.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465495957 13539 80.91.229.3 (9 Jun 2016 18:12:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2016 18:12:37 +0000 (UTC) Cc: Nicolas Petton , Emacs developers To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 09 20:12:22 2016 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 1bB4RE-0005sP-OB for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2016 20:12:16 +0200 Original-Received: from localhost ([::1]:36254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB4RD-0004GM-Sv for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2016 14:12:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56047) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3Uc-0000tV-9Y for emacs-devel@gnu.org; Thu, 09 Jun 2016 13:11:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB3Ub-0007hd-BA for emacs-devel@gnu.org; Thu, 09 Jun 2016 13:11:42 -0400 Original-Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:35865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB3Ua-0007gq-KD for emacs-devel@gnu.org; Thu, 09 Jun 2016 13:11:41 -0400 Original-Received: by mail-lf0-x22b.google.com with SMTP id j5so30504237lfb.3 for ; Thu, 09 Jun 2016 10:11:39 -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:content-transfer-encoding; bh=ArZrNpCVMXWVgYd2oCHNRJwzTq97q9UU49TdqO75NXc=; b=FwmdCXP1YbWQUYjr5fIzvju9jopOQ2Qb+Pg18FYq1CU/WC7SDl/DPNppki2pezHoOo eg62zm/EWIOmArRIrSb6x4sFzryoVLfKdNZO3l4Vi4LoyF4C1goDDRj33PXysUzHbX/x 0Y7lInQcuk8on6KeHLndp4MXC4ZWgC8EFBdTDHucORTELuhgIKiRaF0WwPwHGqzxEuJZ v6R0ecDD1jfzXoHxgFUbdVSzveJUJp3+tUJOprW9xqdEjdx7q2gR1Y6DNwYXydJLLX0b EzA7mAJK0k55IfrQ5EWWxkVbmt3NyFJpS+KJKlTIQ+E3lZLFQPxTEoYt1WO5OSIozTYP mDkw== 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:content-transfer-encoding; bh=ArZrNpCVMXWVgYd2oCHNRJwzTq97q9UU49TdqO75NXc=; b=Pl65PkSiDEs411dmGbxYBDFq4BksH9WMTOBN2TnbhsNSsBFGF0JnuoFOqKWIzNvaV1 lXJBNkrNLUR0rF/oqR8M1rBFBMdyZGUWUxKr0yImauBcPuK3GD9fbEnjxDbmqoI+Nk6E tpDUqJkBCSZ2qtU44fsaP3m28lX/ucTLy5zXTHq0U9JsjjgLBCY1PfBPSdLgjm17DwrK G2Hm0IT7UomhaulXuPtas6bgwcvhyDaNCo5vqBdHJtBf8TzgMsI2ZfZ0q1Xj14Px5L10 FhM5PN3ebKk6avzn/tDqOwujw/EBs7HLtXm8NFcZEF+lu9bzXlACHUnOn5BUwEjt+ii8 b1Dg== X-Gm-Message-State: ALyK8tIbp+WU7iSTrWjkj6FA3STpFqmBa6E+Eru68ZAN4EiS1ZBDmxRBX0Q90sULVJR4Bca3epT1b9bdZjXjPQ== X-Received: by 10.25.139.68 with SMTP id n65mr688506lfd.203.1465492298527; Thu, 09 Jun 2016 10:11:38 -0700 (PDT) Original-Received: by 10.114.182.167 with HTTP; Thu, 9 Jun 2016 10:11:18 -0700 (PDT) In-Reply-To: <87mvmuxuyo.fsf@web.de> X-Google-Sender-Auth: QhST0o6rdYQ-FyAarNHi2EQ5KS0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22b 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:204257 Archived-At: On Thu, Jun 9, 2016 at 9:06 PM, Michael Heerdegen wrote: > I don't understand what that means: how can "reduce" be lazy at all? It > needs to generate all stream elements to compute the requested value, > and that at call time. If the reduction function has an absorbing element, =E2=80=9Creduce=E2=80= =9D can be lazy with respect to all elements after the absorbing element has been reached. Examples: * Over integers or finite reals, (reduce * '(3 14 15 0 =E2=80=A6)) =3D 0 no matter what =E2=80=9C=E2=80=A6=E2=80=9D is. * Over IEEE 754 floats, 0 is not an absorbing element wrt multiplication, but NaN is. * (reduce and '(t t t nil =E2=80=A6)) is nil. * (reduce or '(nil nil nil t =E2=80=A6)) is t.