Talk:Performance/Strictness

From HaskellWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

I removed the following:

NB. do not do this if the expression on the right of $! is a variable - that just wastes effort, because it does not eliminate a suspension. The only reason to do this would be if you were eliminating a space leak.

because <pre-haskell> test = let

 x = undefined
 in (const 0) $! x

</pre-haskell> yields exception and substituting ($) for ($!) yields 0. So ($!) does eliminate a suspension. --beroal 16:58, 16 June 2010 (UTC)