3 ms·
But the second form is also more general, since you can express any computation that way, whereas you can't in the first or third forms. For example: x =
by tsimionescu 7y ago
But the second form is also more general, since you can express any computation that way, whereas you can't in the first or third forms.
For example:
x = A(B)
y = D(x)
z = C(x, E(y))
Is either an important optimization (possibly affecting asymptotic complexity in more complex cases), important for correctness (if any of the functions have side-effects), or at least more succint than the alternatives (in a lazy language like Haskell).