> Though I agree it's
probably best not to mention the phrase "Church encoding" to beginning students.<br><br>Be reassured, that was not my intention ^^.<br>I just pointed that out to support the fact that foldr was *the* fundamental folding operator for lists.<br>
<br><br><div class="gmail_quote">2012/5/24 Brent Yorgey <span dir="ltr"><<a href="mailto:byorgey@seas.upenn.edu" target="_blank">byorgey@seas.upenn.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, May 23, 2012 at 09:24:06AM +0200, Ertugrul Söylemez wrote:<br>
> Yves Parès <<a href="mailto:yves.pares@gmail.com">yves.pares@gmail.com</a>> wrote:<br>
><br>
> > > Note about []: Don't even mention foldl. The folding<br>
> > > combinator for lists is foldr, period.<br>
> ><br>
> > Yes, I do agree. I came to this when I realized foldr gave the church<br>
> > encoding of a list.<br>
><br>
> Not only that. The foldr combinator has an identity fold and implements<br>
> actual structural recursion.<br>
<br>
</div>That's pretty much what a Church encoding is. Though I agree it's<br>
probably best not to mention the phrase "Church encoding" to beginning<br>
students.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Brent<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>