lazy evaluation
lazy evaluation
[′lā·zē i‚val·yə′wā·shən]lazy evaluation
(reduction)Lazy evaluation is one evaluation strategy used to implementnon-strict functions. Function arguments may be infinitedata structures (especially lists) of values, the componentsof which are evaluated as needed.
According to Phil Wadler the term was invented by Jim Morris.
Opposite: eager evaluation.
A partial kind of lazy evaluation implements lazy datastructures or especially lazy lists where function argumentsare passed evaluated but the arguments of data constructorsare not evaluated.
Full laziness is a program transformation which aims tooptimise lazy evaluation by ensuring that all subexpressionsin a function body which do not depend on the function'sarguments are only evaluated once.