The 'eval' function evaluates the 'expression' and returns the resulting value.
(eval '(+ 2 2)) ; returns 4
(eval (cons '+ '(2 2 2))) ; returns 6
(eval (list '+ '2 '3 )) ; returns 5
(setq a 10) ; set up A with value 10
(setq b 220) ; set up B with value 220
(eval (list '+ a b )) ; returns 230 because
; (list '+ a b) => '(+ 10 220)
(eval (list '+ 'a b)) ; returns 230 because
; (list '+ 'a b) => '(+ A 220)
; and A has the value 10
See the
eval
function in the