[racket] Functions as symbols

From: Stephan Houben (stephanh at planet.nl)
Date: Fri Oct 7 04:36:05 EDT 2011

Hi Mark,

On 10/07/2011 09:53 AM, Mark Carter wrote:
> A more basic question would be: is there any way I can convert from '+ to + - i.e. a symbol to a function?

Either just (eval '+) or (namespace-variable-value '+).

Please note that this looks up the symbol in the namespace as indicated by the current-namespace parameter,
I would suggest that you check out the docs for that to make sure it is looked up in the namespace
you want.

If you get this symbol from some external source (file, network), I would suggest you make 300% sure
that the namespace you use only contains the bindings you want, otherwise somebody
will replace '+ with 'upload-creditcard-info-to-cybercriminals .


Posted on the users mailing list.