[racket] How to set! via name of symbol
Thank you.
Tue, 22 Jul 2014 06:56:09 +0100 от Matthew Flatt <mflatt at cs.utah.edu>:
>At Tue, 22 Jul 2014 08:41:12 +0400, Roman Klochkov wrote:
>> In Common Lisp one can do
>> (defvar a 1)
>> (defvar b 'a)
>>
>> (set b 2)
>> (print a) ;; prints 2
>>
>> Is it possible in Racket. I mean
>> (define a 1)
>> (define b 'a)
>> (??? b 2)
>>
>> What write instead of ??? to change a?
>
>If `a` is defined at the top level, then `namespace-set-variable-value!`.
>
--
Roman Klochkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140722/5bd510d5/attachment.html>