Another sample for set-ref doc
Posted: Thu Aug 01, 2013 12:56 pm
When I want to do the same as with the longtime depreciated 'replace-assoc' it would be this:
Makes for me more sense as a real world example.
Regards
Code: Select all
> (set 'data '(fruits (apples 123 44) (oranges 1 5 3)))
(fruits (apples 123 44) (oranges 1 5 3))
> (set-ref (assoc 'apples data) data '(Apples 456 55))
(fruits (Apples 456 55) (oranges 1 5 3))
Regards