Evaluating symbols in nested lists
Posted: Mon Dec 24, 2007 1:13 am
I have the following symbols and values:
> key
"test"
> res
(("test" "one"))
> val
"one"
> newval
"two"
;; And I want to change 'res to (("test" ("one" "two"))
;; but:
;; gives me
(key (list val newval))
I understand that the symbols in '(key (list val newval))
aren't being evaluated, but don't
know which function to use to evaluate them.
Thanks
Tim
> key
"test"
> res
(("test" "one"))
> val
"one"
> newval
"two"
;; And I want to change 'res to (("test" ("one" "two"))
;; but:
Code: Select all
(replace-assoc key res '(key (list val newval)))
(key (list val newval))
I understand that the symbols in '(key (list val newval))
aren't being evaluated, but don't
know which function to use to evaluate them.
Thanks
Tim