[Haskell-cafe] Formalisation for types of monads

Yves Parès yves.pares at gmail.com
Thu May 24 15:50:50 CEST 2012


> Though I agree it's probably best not to mention the phrase "Church
encoding" to beginning students.

Be reassured, that was not my intention ^^.
I just pointed that out to support the fact that foldr was *the*
fundamental folding operator for lists.


2012/5/24 Brent Yorgey <byorgey at seas.upenn.edu>

> On Wed, May 23, 2012 at 09:24:06AM +0200, Ertugrul Söylemez wrote:
> > Yves Parès <yves.pares at gmail.com> wrote:
> >
> > > >     Note about []:  Don't even mention foldl.  The folding
> > > > combinator for lists is foldr, period.
> > >
> > > Yes, I do agree. I came to this when I realized foldr gave the church
> > > encoding of a list.
> >
> > Not only that.  The foldr combinator has an identity fold and implements
> > actual structural recursion.
>
> That's pretty much what a Church encoding is.  Though I agree it's
> probably best not to mention the phrase "Church encoding" to beginning
> students.
>
> -Brent
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120524/3eb3b30a/attachment.htm>


More information about the Haskell-Cafe mailing list