<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Apr 26, 2015 at 3:23 PM, martin <span dir="ltr"><<a href="mailto:martin.drautzburg@web.de" target="_blank">martin.drautzburg@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":mz" class="a3s" style="overflow:hidden">At least things work now as expected. But could you please elaborate on the difference between<br>
<span class=""><br>
tAppend (Temporal as) (Temporal bs) = Temporal (as ++ bs)<br>
<br>
</span>vs<br>
<br>
tAppend as bs = Temporal $ (toList as) ++ (toList bs)<br>
<span class="">toList (Temporal xs) = xs<br>
<br>
</span>Why is the first one more strict than the second?</div></blockquote></div><br>Because the first one pattern matches both parameters immediately to ensure that the constructor is the one named (Temporal). The second defers it, since the toList call is not forced and therefore won't be invoked (along with its strict pattern match) until its value is needed.<br><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>