
16 Jun
2011
16 Jun
'11
10:23 a.m.
On Thu, Jun 16, 2011 at 11:39 AM, Jon Fairbairn
Duncan Coutts
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