> Though I agree it's
probably best not to mention the phrase &quot;Church encoding&quot; 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">&lt;<a href="mailto:byorgey@seas.upenn.edu" target="_blank">byorgey@seas.upenn.edu</a>&gt;</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>
&gt; Yves Parès &lt;<a href="mailto:yves.pares@gmail.com">yves.pares@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; &gt;     Note about []:  Don&#39;t even mention foldl.  The folding<br>
&gt; &gt; &gt; combinator for lists is foldr, period.<br>
&gt; &gt;<br>
&gt; &gt; Yes, I do agree. I came to this when I realized foldr gave the church<br>
&gt; &gt; encoding of a list.<br>
&gt;<br>
&gt; Not only that.  The foldr combinator has an identity fold and implements<br>
&gt; actual structural recursion.<br>
<br>
</div>That&#39;s pretty much what a Church encoding is.  Though I agree it&#39;s<br>
probably best not to mention the phrase &quot;Church encoding&quot; 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>