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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!