Question: 1. Write a Scheme function that takes two atoms and a list as parameters and replaces all top-level occurrence of the first given atom in
1. Write a Scheme function that takes two atoms and a list as parameters and replaces all top-level occurrence of the first given atom in the list with the second given atom. For example, (replace 'a 'c '(a b (a b)) returns (c b (a b)), (replace 'a 'c '(a b (a b) a b c)) returns (c b (a b) c b c)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
