(subst new old list)
Substitute this for that in a list.
This function is much like the search-and-replace function in a word processor. The difference is that subst works with lists, not strings.
The subst function replaces every occurrence of old with new in list. You can use this function together with the assoc function to manipulate dotted-pair entity data.
Example
Code | Returns |
---|---|
(subst '"a" '"b" '("a" "b" "c")) | (a a c) |