STAT 102 Midterm: STAT 102 UPenn Midterm1Fall 2001
Document Summary
My signature below certi es that i have complied with the university of pennsylvania"s code of. Use the four-step design methodology to implement a function called trim that, when given an integer n and a list x, returns the list with all occurrences of n removed from the beginning of the list. For example, trim 1 [1;1;2;1] should yield the list [2;1]: 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: step 2 is formalizing the interface. Write down the type of the trim function as you might. Nd it in a . mli le or module interface. val trim: _____________________________________________: step 3 is writing test cases. Complete the following tests with the expected behavior. We have done the rst one for you, based on the problem description.