Question: Scheme Function In Racket reverseShuffle - takes two lists, and returns a single list that is the reverseShuffle merging of the two input lists. A
Scheme Function In Racket
"reverseShuffle" - takes two lists, and returns a single list that is the "reverseShuffle" merging of the two input lists. A "reverseShuffle" is a merging of two lists L and M, that is built in the following order: 1 - the first element of L 2 - the last element of M 3 - the second element of L 4 - the next-to-last element of M etc. Thus the output list is built by alternating items from L and M, in the forward direction from L, and the backward direction from M. For example, (reverseShuffle '(3 8 2 6) '(7 1 5 9)) should return: (3 9 8 5 2 1 6 7) You can assume that the two incoming lists are both the same length. You may find it useful to break the problem down and create some helper functions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
