Homework 4Due Wednesday, October 28 by 3pm.Language: Beginning Student with List Abbreviations 1 Binary Search TreesDo exercise 14.2.3 from HtDP. 2 Tail-Recursive FunctionConsider the following function for summing the elements of a list: (define (sum-list l) Write a tail-recursive version of this function (you may use an auxiliary function). 3 Sorted Lists; A sorted-list is either Write the following function: ; in? : sorted-list number -> boolean You must exploit the sorted-list invariant. 4 Heap; A heap is either Write the following functions: ; in-heap? : heap number -> boolean ; insert-in-heap : heap number -> heap You must exploit/maintain the heap invariant in each function (as appropriate). |