Course Links

Resources

External

This homework consists of four introductory OCaml exercises. Just as with the labs, the assigned tasks are described in comments contained within the code. You can download the starter files here.

You may work with a partner for this assignment if you adhere to the guidelines.

Hints

Proceed in small, discrete steps, making sure that your program compiles each time. If it does not, back up and try again. It is much easier to debug a small section of code than a large one. Use inspection, printing, and compiler error messages to identify and fix any errors.

This assignment is based on a longer one from the UPenn course we have been following. You can read the FAQ for that assignment. (Not all the items will apply because our assignment is shorter and we are not using Codio.)

Remember that each time you change your program, you need to compile it again before you run it. The commands to do that are:

ocamlopt -o ocaml_hw1 assert.ml ocaml_hw1.ml
./ocaml_hw1

To Submit