Re:On Learning Haskell
by carterschonwald on Wednesday March 10, 2010 @12:58PM
(#1181501)
they really are the same thing semantically, a thunk is a just closure that will be evaluated once (being applied to a unit/trivial value), and then GHC will have its runtime mark a bit that indicated that its been evaluated and redirect the thunk pointer to a value. This is simply a difference of efficiency between normal order evaluation vs lazy evaluation, with a special sort of common subexpression elimination built into the language
[ Parent
| on HN ]
There are no comments on this comment yet.