[plt-scheme] How to find the value associated to a symbol via an identifier ?
On Feb 16, Grant Rettke wrote:
>
> I see that this is a literal approach:
>
> #lang scheme
>
> (define id45 45)
> (define idid 'id45)
>
> (define-syntax find-symbol-value
> (lambda (stx)
> (syntax-case stx ()
> ((find-symbol-value)
> (with-syntax
> ((var (datum->syntax #`find-symbol-value 'id45 #f)))
> #`var)))))
>
> (find-symbol-value)
You won't be able to do it this way -- note that your code doesn't use
the value of `idid'.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!