CIS 120 Midterm: CIS 120 UPenn Midterm1 Fall12 blank

19 views10 pages

Document Summary

My signature below certi es that i have complied with the university of pennsylvania"s code of. For example, intersperse 0 [1;2;3] should yield the list. The function should be generic and work for any type of lists, not just lists of integers. (0 points) step 1 is understanding the problem. You don"t have to write anything for this part your answers below will demonstrate whether or not you succeeded with step 1. (3 points) step 2 is formalizing the interface. Write down the type of the intersect function as you might nd it in a . mli le or module interface: val intersperse: (12 points) step 3 is writing test cases. Complete the following tests with examples of the expected behavior. Note that some test cases are better than others, and credit will be assigned accordingly: make sure your tests cover a suf ciently broad range of interesting inputs.