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:
(replace-assoc key res '(key (list val newval)))
;; 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
Never mind:
I was looking for this:
(replace-assoc key res (expand '(key (val newval))
'key 'val 'newval))
Doesn't common lisp use the comma operator to do the
same thing?
thanks
Tim
just do:
(replace-assoc key res (list key (list val newval)))
=> (("test" ("one" "two")))
Lutz
Understood.
Thanks, Lutz