MP0 will help you learn basic OCaml syntax, and give you some practice
writing simple functions, and give you practice with the handin system.
MP0 is optional and ungraded, but we strongly encourage you to complete
it before Thursday's lecture.
For reference, please see the linked guide to basic OCaml.
Keep in mind that your solution must
define every required function, otherwise the grading program will not
compile and you will receive no points for the entire homework set.
For example, if you decide not to implement the function splat
(for whatever reason), you need to have it defined as:
let splat x = raise (Failure(""))
IMPORTANT: Make sure that you read the README file in the grader
bundle . This file
contains important information.
Also, make sure you read the "Guide for Doing MPs".
NOTE: Solution to Problem 4:
We inadvertantly included a problem on MP0 that involves material
not covered in the Basic Guide to OCaml.
Since we intended that all the problems be very simple, we don't want
you to have to search around the web for this.
So here is the solution:
let s_paired_with_a_times b = (s, a * b);;
The feature this uses is ``tuples;'' we'll discuss them in
lecture 2.
|