<br><br><div class="gmail_quote">On Mon, Jul 26, 2010 at 10:59 PM, Jason Dagit <span dir="ltr">&lt;<a href="mailto:dagit@codersbase.com">dagit@codersbase.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div>  ($) is application, but in the space of functions it is identity.  So, if you think the elements in your thrist as being values in the space of functions, you&#39;re asking for a right fold that is like, v1 `id` (v2 `id` (v3 `id` ...), which I hope you agree doesn&#39;t make that much sense.</div>
</div></blockquote><div><br></div><div>I just realized a better way to phrase this analogy is that id and ($) are 0, and (.) is (+).</div><div><br></div><div>So your foldr expands like:</div><div>v1 `0` (v2 `0` (v3 `0` .... (vn `0` 0) ... )</div>
<div><br></div><div>But if you use (.), it expands like:</div><div>v1 + (v2 + (v3 + ... (vn + 0) ... )</div><div><br></div><div>I guess you could pick id = ($) = 1, and (.) = (*).  I think the analogy works equally well, but I might be forgetting something simple.  Either way, I bet you get what I&#39;m rambling about so I&#39;ll stop now :)</div>
<div><br></div><div>Jason</div></div>