{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

mp2 - MP 2 Pattern Matching and Recursion CS 421 Fall 2007...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MP 2 – Pattern Matching and Recursion CS 421 – Fall 2007 Revision 1.1 Assigned August 28, 2007 Due September 4, 2007 23:59 Extension 48 hours (20% penalty) 1 Change Log 1.0 Initial Release. 1.1 Corrected mistypings in Problems 1, 3, 4,and 11. 2 Objectives and Background The purpose of this MP is to help the student master: 1. pattern matching 2. higher-order functions 3. recursion 3 Instructions The problems below have sample executions that suggest how to write answers. Students have to use the same function name, but the name of the parameters that follow the function name need not be duplicated. That is, the students are free to choose different names for the arguments to the functions from the ones given in the example execution. We also will use let rec to begin the definition of a function that is allowed to use rec . You are not required to start your code with let rec . For all these problems, you are allowed to write your own auxiliary functions, either internally to the function being defined or externally as separate functions. In fact, you will find it helpful to do so on several problems. In this assignment, you may not use any library functions (except @ , which is also pervasive).
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern