Bill Allombert on Tue, 22 Jun 2004 23:58:53 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Functions


On Tue, Jun 22, 2004 at 08:00:56PM +0100, Jon Perry wrote:
> If f(x)=x^2, then the line
> 
> f(x)+=x
> 
> to give f(x)=x^2+x
> 
> doesn't work.
> 
> Could this be a feature?

Yes/no. Yes since f(x) is not a function, but the value of a function at
point x. Supose x=2, do you think 4+=2 make sense ? 

No, GP is not able to handle functions as objects, so you cannot make
operations with functions, or even passing function as parameter. This
is certainly a limitation I will try to remove in my experimental GP
interpretor.

Cheers,
Bill.