[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 27 Nov 2001 18:23:53 -0600 (CST)
(define (f x y) (+ x y))
(define g 'f)
(display (f 1 2))
(display ((eval g) 1 2))
(define ef-str "f")
((eval ef-str) 1 2)
produce the follwoing:
ERROR: Wrong type to apply: "f"
i was expecting to get the same result with
is there a way to use a string as a function name ?
i also tried string->symbol, eval and operator ":"
i'm pretty sure it is possible.
it would be very usefull when ef-str is read from user input for e.g