[racket] Functions as symbols
6 hours ago, Mark Carter wrote:
> I would obtain the answer 3. Is there any way I can do this? The
> following works, but I'm wondering if it's the best way:
> (eval `(apply ,sym '(1 2)))
> A more basic question would be: is there any way I can convert from
> '+ to + - i.e. a symbol to a function?
Always good to read for such questions:
http://docs.racket-lang.org/guide/eval.html
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!