
On Mon, Jul 26, 2010 at 10:59 PM, Jason Dagit
($) 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're asking for a right fold that is like, v1 `id` (v2 `id` (v3 `id` ...), which I hope you agree doesn't make that much sense.
I just realized a better way to phrase this analogy is that id and ($) are 0, and (.) is (+). So your foldr expands like: v1 `0` (v2 `0` (v3 `0` .... (vn `0` 0) ... ) But if you use (.), it expands like: v1 + (v2 + (v3 + ... (vn + 0) ... ) 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'm rambling about so I'll stop now :) Jason