From: Mr SJ Rosin
Subject: help! getting a functions symbol from within itself?
Date: 
Message-ID: <4591e5$7qt@harbinger.cc.monash.edu.au>
Howdy,

I am a bit of a newcomer to lisp (not too new) and I have a VERY specific need-

	I am writing a Genetic Alg. where functions are created and assigned names by the system (using gensym) thus my code does not know what its name is when it is called - why is this a problem? Because the function is given several properties (and I want to give it more!) so I need to know how to get the name of the current function from within itself ie. I want to get a property from the currently executing function, without declaring variables to store the function as a symbol ....PLEASE SEND HELP SOON!

;<
Sime
······@penfold.cc.monash.edu.au
"We are the Navy Blues....We are the Champions..." - Go Blues
From: Geert-Jan van Opdorp
Subject: Re: help! getting a functions symbol from within itself?
Date: 
Message-ID: <GEERT.95Oct10141805@sparc.aie.nl>
In article <··········@harbinger.cc.monash.edu.au> ······@penfold.cc.monash.edu.au (Mr SJ Rosin) writes:


> Howdy,
> 
> I am a bit of a newcomer to lisp (not too new) and I have a VERY specific need-
> 
> 	I am writing a Genetic Alg. where functions are created and assigned
> names by the system (using gensym) thus my code does not know what its 
> name is when it is called - why is this a problem? Because the function 
> is given several properties (and I want to give it more!) so I need to 
> know how to get the name of the current function from within itself ie. 
> I want to get a property from the currently executing function, without 
> declaring variables to store the function as a symbol 
> ....PLEASE SEND HELP SOON!

What about creating a hash-table with the function as a key
and the propertylist as value? You don't even need gensym then.

Check out the hash-table functions if you use Common Lisp



Geert-Jan
-- 
Geert-Jan van Opdorp
AI-Engineering
Amsterdam, The Netherlands
·····@aie.nl