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
Get step-by-step solutions from verified subject matter experts
