Call By Need

From LazyEvaluation:

CallByNeed essentially means that expressions are only evaluated once and then only if the evaluation is actually needed. All future instances of the expression are then exchanged directly for the calculated value. In some cases this can go beyond incremental optimization and actually reduce the computational complexity of an algorithm.

The CallByNeedSemantics pattern can be used to implement CallByNeed in a language that does not directly support it.

CategoryLanguageFeature CategoryLazyPattern

EditText of this page (last edited November 11, 2013) or FindPage with title or text search