On Wed, May 23, 2012 at 09:24:06AM +0200, Ertugrul Söylemez wrote: > Yves Parès <[email protected]> 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 [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
