[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: |
Fri, 10 Jun 2016 03:06:27 +0600 |
On Fri, Jun 10, 2016 at 1:41 AM, Michael Heerdegen
<address@hidden> wrote:
>> If the reduction function has an absorbing element, “reduce” can be
>> lazy with respect to all elements after the absorbing element has been
>> reached.
>
> Do you think we should implement something like this for `seq-reduce'?
There are trade-offs.
A left fold which forces the intermediate result before recurring has
good space complexity, but can only be lazy in the values of the
elements, not their number.
A right fold can be lazy in the number of elements, but in the general
case, when applied to a long list, will build a deep evaluation tree.
https://wiki.haskell.org/Foldr_Foldl_Foldl'
- Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, (continued)
- 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, 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/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
Re: [PATCH] Gnu Elpa: stream.el: Add some more basic stream operations, Nicolas Petton, 2016/06/09