Assignment #12: Higher-order FunctionsOut: Thursday, April 2nd Due: Thursday, April 9th, 4:00pm |
This homework must be done and submitted with your partner. Please see the submissions page for details on how to submit with your partner.
merge, which takes two sorted
lists of Numbers and combines them into one sorted list of
Numbers. Remember the template for processing two lists.
merge to design the merge-sort
function. This function uses generative recursion. It splits a
list into two halves, then recursively sorts each half, then
merges the results back together. Think about what the
trivial case is for this generative recursion.
You might compare this to (but do not do) Problem 26.1.2 from Section 26.1.