The 'set' function evaluates 'symbol' and sets 'expr' as it's value. If the 'symbol' value is quoted via the quote special form or read-macro expansion, the 'symbol' is not evaluated. 'set' returns the value from 'expr' as it's result.
(set 'a 2) ; sets symbol A to value 2 (set 'value a) ; sets symbol VALUE to value 2 (print value) ; show the value - prints 2 (set 'name 'myvar) ; set symbol NAME to value MYVAR (set name 12345) ; set symbol which is the value ; of NAME (MYVAR) to 12345 (print name) ; prints MYVAR (print myvar) ; prints 12345 (set notsymbol 1) ; error: unbound variable (set name notvalue) ; error: unbound variable
See the
set
function in the