I have an associative binary operation '
.', which I often use in this sort of way:
result = expr1 . expr2 . expr3 . expr4
.' operation is very fast, but the individual subexpressions are often hard to compute. So I would like my '
.' operation to automatically parallelize itself, evaluating each of the separate subexpressions in separate kernels before finally taking the results and actually performing the operation.
How can I achieve this in Mathematica? It seems there are several challenges. One is to prevent the subexpressions evaluating before the '
.' operation is evaluated.