The lazy evaluation feature is needed to handle recursive data structures like trees and graphs 懶惰求值的特性常用在處理像tree或者graph這樣的遞歸數(shù)據(jù)結構上。
One example of a lazy evaluation is a function that generates an infinite list of fibonacci numbers, but where the computation of the 一個懶惰計算的例子是生成無窮fibonacci列表的函數(shù),但是對第n個
In lazy evaluation, an expression is not evaluated as soon as it is bound to a variable, but when the evaluator is forced to produce the expression s value 在懶惰計算中,表達式不是在綁定到變量時立即計算,而是在求值程序需要產(chǎn)生表達式的值時進行計算。