In Chapter 7, author says the map2 should take arguments lazily ( before introducing fork) to get parallelism and referential transparency .
The map 2 signature will be
def map2[A, B, C](a: => Par[A], b: => Par[B])(fn: (A, B) => C): Par[C]
and sum function will have
Par.map2(sum(l), sum(r))(_ + _) .
This version runs in parallel. But if I rewrite the same sum function as below
val leftSum = sum(l)
val rightSum = sum(r)
map2(leftSum,rightSum)(_+_)
which is no longer parallel. Is it the case of breaking referential transparency?