<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:12pt"><div>Is it possible to set an id from a symbol, call it set-symbol? For example, I might type</div><div>(define life -12)<br></div><div>(set-symbol 'life 42)</div><div>life ; => 42</div><div><br></div><div>The reason I want to do this is so that I can store a cache of variables to disk.</div><div><br></div><div>The cache will contain a list of variables to be stored. So I might ultimately want something like</div><div>(define-cache a-cache "mycachefile")</div><div>(encache a-cache foo)</div><div>(encache a-cache bar baz)</div><div>(set! foo 42)</div><div>foo ; => 42</div><div>(save-cache a-cache)<br>
</div>which attempts to define the variables foo, bar and baz if they have been serialized to mycachefile, and leave them as (void) otherwise.<br><br><div><br></div><div><br></div><div><br></div></div></body></html>