Question: Scheme programming Question. I need to create this function. exchange takes a list (possibly containing sublists) and a list of atoms. You may assume that

Scheme programming Question.

I need to create this function.

exchange takes a list (possibly containing sublists) and a list of atoms. You may assume that both lists contain the same number of non-null atoms. The output should be identical to the first list except that the atoms of the list should be the same as the atoms of the second list, in order.

> (exchange '(((a)) (b ((c)))) '(1 2 3)) (((1)) (2 ((3)))) > (exchange '(((() a) b) c) '(1 2 3)) (((() 1) 2) 3)

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!