Re: Aggregation (with GBY) is Relational Division
Date: Tue, 06 Jun 2006 06:10:47 GMT
David Cressey wrote:
> "Marshall" <marshall.spight_at_gmail.com> wrote in message
>> David Cressey wrote:
>>> "Marshall" <marshall.spight_at_gmail.com> wrote in message
>>> PS: can you point me to a web site that will explain "fold" to me?
>> I did a bit of searching and came up with a short intro:
>> Fold is simply inserting a binary operator "in between" the elements
>> in a collection. Usually an ordered, collection, alas. Since it's an
>> ordered collection, they have to do the extra work to take order
>> into account, so you have both foldl and foldr, depending on
>> whether you start at the "left" end of the list or the "right".
>> (Beginning vs. end.)
>> foldl(append, , [1, 2, 3])
>> returns [3, 2, 1]
>> Fold depends on being able to separate the first element of a list
>> from the rest, and on the ability to recognize an empty list, but
>> I don't think it needs anything else.
> > Thanks for the info on fold. I think I'm going to try to learn this one. > It looks useful. > > So fold needs car, cdr, and nil, but nothing else. Hmmmmmmm.......
Cheers, Frank. Received on Tue Jun 06 2006 - 08:10:47 CEST