How can I reduce a collection via adjacent pairs?
For instance, let + be a non-associative operator:
(1, 2, 3, 4, 5, 6) => ((1+2) + (3+4)) + (5+6)
(a, b, c, d, e, f, g, h) => ((a+b) + (c+d)) + ((e+f) + (g+h))
This question is similar to this, however I don't think parallel collections apply because the semantics require an associative operator for determinism. I'm not concerned so much about parallel execution as I am about the actually associating such that it constructs a balanced expression tree.