[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations
From: |
Yuri Khan |
Subject: |
Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations |
Date: |
Thu, 9 Jun 2016 23:11:18 +0600 |
On Thu, Jun 9, 2016 at 9:06 PM, Michael Heerdegen
<address@hidden> 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, “reduce” 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 …)) = 0 no
matter what “…” is.
* Over IEEE 754 floats, 0 is not an absorbing element wrt
multiplication, but NaN is.
* (reduce and '(t t t nil …)) is nil.
* (reduce or '(nil nil nil t …)) is t.
- [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/02
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/02
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Nicolas Petton, 2016/06/02
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/02
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/08
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Nicolas Petton, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Nicolas Petton, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Davis Herring, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations,
Yuri Khan <=
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Yuri Khan, 2016/06/09
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/10
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Yuri Khan, 2016/06/10
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/10
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Markus Triska, 2016/06/12
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/12
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Nicolas Petton, 2016/06/12
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Markus Triska, 2016/06/12
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Michael Heerdegen, 2016/06/10