Bill Allombert on Thu, 17 Oct 2013 20:12:42 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: gp/pari version of the "Map" datatype and "reduce" function
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: gp/pari version of the "Map" datatype and "reduce" function
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
- Date: Thu, 17 Oct 2013 20:12:30 +0200
- Delivery-date: Thu, 17 Oct 2013 20:12:42 +0200
- In-reply-to: <CAAkfSGJHwpm3gSDDh=Bq-+huvJ3M0Riw-MgX_x+eOoT0KVYU0Q@mail.gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CAGeO=y28ziR_rer=zxJAqYY=+_xh_WRLQWL+gyDHJJ5XT46zDQ@mail.gmail.com> <20131017114210.GD11344@yellowpig> <CAAkfSGJHwpm3gSDDh=Bq-+huvJ3M0Riw-MgX_x+eOoT0KVYU0Q@mail.gmail.com>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Oct 17, 2013 at 01:11:18PM -0400, Charles Greathouse wrote:
> I think "fold" is good and avoids clashes.
There is the question of associativity.
I suggest we make it strictly less associative.
However to answer Richard, lots of GP functions fold automatically, or
there are variants that do:
? vecmax([1,2,3])
%2 = 3
? gcd([4,6,9])
%3 = 1
? factorback([1,2,3,4])
%4 = 24
Cheers,
Bill.