<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">OK, in f, *length* already knows it's argument is a list.<br><br>In g, *length* doesn't know what's inside the parens, extra evaluation there. So g is already ahead before we get to what's inside the [] and ().<br><br>But since both still have eval x to *thunk* : *thunk*,&nbsp; g evaluates "to a deeper level?"<br><br>Michael<br><br><br>&gt; Wouldn't both functions need to evaluate x to the same level, *thunk* : *thunk* to insure listhood?<br>&gt;<br>&gt; f x = length [head *thunk* : *thunk*]<br>&gt; g x = length (tail *thunk* : *thunk*)<br>&gt;<br>&gt; Michael<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a ymailto="mailto:Haskell-Cafe@haskell.org" href="http://us.mc311.mail.yahoo.com/mc/compose?to=Haskell-Cafe@haskell.org"><span class="yshortcuts"
 id="lw_1280594505_1">Haskell-Cafe@haskell.org</span></a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank"><span class="yshortcuts" id="lw_1280594505_2">http://www.haskell.org/mailman/listinfo/haskell-cafe</span></a><br>&gt;<br><br>Notice the two different kinds of brackets being used in f versus g :)<br><br>--- On <b>Sat, 7/31/10, Ben Millwood <i>&lt;haskell@benmachine.co.uk&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Ben Millwood &lt;haskell@benmachine.co.uk&gt;<br>Subject: Re: [Haskell-cafe] Laziness question<br>To: "michael rice" &lt;nowgate@yahoo.com&gt;<br>Cc: haskell-cafe@haskell.org<br>Date: Saturday, July 31, 2010, 12:38 PM<br><br><div class="plainMail">On Sat, Jul 31, 2010 at 4:56 PM, michael rice &lt;<a ymailto="mailto:nowgate@yahoo.com" href="/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;
 wrote:<br>&gt;<br>&gt; From: <a href="http://en.wikibooks.org/wiki/Haskell/Laziness" target="_blank">http://en.wikibooks.org/wiki/Haskell/Laziness</a><br>&gt;<br>&gt;<br>&gt; Given two functions of one parameter, f and g, we say f is stricter than g if f x evaluates x to a deeper level than g x<br>&gt;<br>&gt; Exercises<br>&gt;<br>&gt; &nbsp;&nbsp; 1. Which is the stricter function?<br>&gt;<br>&gt; f x = length [head x]<br>&gt; g x = length (tail x)<br>&gt;<br>&gt;<br>&gt;<br>&gt; Prelude&gt; let f x = length [head x]<br>&gt; Prelude&gt; let g x = length (tail x)<br>&gt; Prelude&gt; f undefined<br>&gt; 1<br>&gt; Prelude&gt; g undefined<br>&gt; *** Exception: Prelude.undefined<br>&gt; Prelude&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; So, g is stricter than f?<br>&gt;<br>&gt; Wouldn't both functions need to evaluate x to the same level, *thunk* : *thunk* to insure listhood?<br>&gt;<br>&gt; f x = length [head *thunk* : *thunk*]<br>&gt; g x = length (tail *thunk*
 : *thunk*)<br>&gt;<br>&gt; Michael<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a ymailto="mailto:Haskell-Cafe@haskell.org" href="/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>&gt;<br><br>Notice the two different kinds of brackets being used in f versus g :)<br></div></blockquote></td></tr></table><br>