Kevin Ryde on Thu, 11 Dec 2014 08:40:35 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: memoize.gp
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Date: Thu, 11 Dec 2014 18:35:22 +1100
- Delivery-date: Thu, 11 Dec 2014 08:40:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1418283623; bh=2hMhmHp29LQKS3lsMpJsYI5Ey8HHTxOnRHcU8xy9++c=; h=From:To:Subject:References:Date:From:Subject; b=iuRE/S9yrT+Jli9sEdmZ/y+iLaGdlz3AEKvwci8e6bvLQQeFHlBRR817XlZm419lehZ7NuA8ZCako4snzNQKLolgZSFXgb8/2Z51CUTSi19cTMKY9qFWSdtHFziL2MV0dIxSYzv04XQRbdrXrA3/RTMblwxzM5KYqYdzqOp0N/n4fWf/ukMCYlH7z/7QVWXTNunMQQRFJ4gqnbYLm6wtEjlVsy+XyBHGCOp6uNQCGCCpRX9+YMyOlkxFW31lwj2d9XjShhLN1kNlqEm22HGV/6804omfFh9CjzPjoxQNVxNa2joTa/Q1IbFX5ZSHpoKEL2EvhWr3VAl0Sg36iPESHQ==
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com.au; b=EYTfLf0mz0N16HmOkBizW0dwJ3iY+3KO9SHSXsrUP+Ql+BqUJfEKufQfQckjSD9XYDpWvse5lyuGi+STD/T6+TFTopBUuDizKlD9a1acdbxtDe7PJ53oe3IZHoNuFpezvLvsIWjOukWhgOxq2HMWFBDwmLXdyIEen3u8G4r+NsjeDLy2gJrwrK3gd6J/Xj2KaZC/rL8SLXa779F+Bi9JZMZ1bMMNd+j4t1i84sg4lzs4iqRKqqzye9oI++DO7iof6pj6fYUwliE1HQagyrdZN1YDSWytQHCG8Bdsxu1RoDqW+JwzkPwLTBczWkxClEljE680wXr0yWV4jW5LY9x5CQ==;
- Organization: Bah Humbug
- References: <87388p6y5o.fsf@blah.blah> <20141209182505.GB7517@yellowpig>
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> writes:
>
> ? component(f,5)
> %2 = ["x","x^2+1"]
Looks promising. Is there a list of the arg names without default value
expressions? Eg. just "x,y,z" from something like
foo(x,y=2*x+1,z=5) = fibonacci(x)*fibonacci(y)*fibonacci(z);
component(foo,5)
=>
["x,y=2*x+1,z=5", "fibonacci(x)*fibonacci(y)*fibonacci(z)"]
A list of arg names and expressions individually rather than in a single
string could also suit.
(I have to confess to hardly using default args, and I don't think I've
memoized any, but the idea was for convenience and generality. :-)
- References:
- memoize.gp
- From: Kevin Ryde <user42_kevin@yahoo.com.au>
- Re: memoize.gp
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>