Various folds in the containers package

Johan Tibell johan.tibell at gmail.com
Thu Jun 16 12:23:36 CEST 2011


On Thu, Jun 16, 2011 at 11:39 AM, Jon Fairbairn
<jon.fairbairn at cl.cam.ac.uk> wrote:
> Duncan Coutts <duncan.coutts at googlemail.com> writes:
>
>> So I suggest all four folds. They are all useful and can all be
>> implemented efficiently.
>
> For certain classes of operation ⓧ, a tree-fold
>
> (( _ ⓧ _) ⓧ (_ ⓧ _))
>
> gives better complexity. Is there room for that, or is it too
> difficult to decide what to do about the unbalanced parts?

I've been thinking about adding monoidal fold to unordered-containers.
One interesting property is that you can evaluate branches in
parallel. Perhaps containers should have one too.

Cheers,
Johan



More information about the Libraries mailing list