[plt-scheme] setting a var whose name is det'ed at runtime (newb)

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Apr 26 11:10:33 EDT 2007

On Apr 26, 2007, at 9:44 AM, George Herson wrote:

> (set! (get-name) (car some-list))
> returns "set!: not an identifier in: (get-name)".  I
> think this behavior is required by lexical scoping, in
> which case, How do we set a variable whose name is
> dynamically determined?  thanks


(set-box! (get-the-box-from-where-ever-it-is-now) 42)

-- Matthias



Posted on the users mailing list.