full laziness
full laziness
(functional programming)f x = x + sqrt 4
is applied, (sqrt 4) will be evaluated. Since (sqrt 4) doesnot depend on x, we could transform this to:
f x = x + sqrt4sqrt4 = sqrt 4
We have replaced the dynamically created (sqrt 4) with asingle shared constant which, in a graph reduction system,will be evaluated the first time it is needed and then updatedwith its value.
See also fully lazy lambda lifting, let floating.