
15 Sep
2007
15 Sep
'07
1:51 a.m.
On Sep 14, 2007, at 21:35 , L.Guo wrote:
Thanks for your advice about thunk, though I do not understand *thunk* very well. Is there any other discriptions about thunk ?
A "thunk" is, in general, a piece of code which represents a suspended or delayed action. In Haskell, it represents a lazy computation: Haskell will only evaluate the code if the value is actually needed, and even then only just enough to satisfy the immediate need (thus, the result of evaluating a thunk may be a value, or another thunk). -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH