OCaml Warmup

Description

Complete the function definitions in the warmup.ml file. In your code, you may only use library functions found in the Stdlib module. (This means you may not use the List module!) You may not use any imperative structures of OCaml such as references.

Instructions

To start the assignment, download the project1-handout.zip file from D2L. Then unzip the file to your development environment. If you wish to develop on the CSIT Linux server, then you need to add:

  /home/kutztown.edu/schwesin/.opam/default/bin

to your PATH environment variable. One way to do this is to add the following line to your ~/.bashrc file and then either source the file or log out and log back in:

  export PATH=/home/kutztown.edu/schwesin/.opam/default/bin:${PATH}

To execute the test cases, run the following command:

  dune runtest -f

To list the public test cases, run the command:

  dune exec test/public.exe -- -list-test

To run a specific public test case, run the command:

  dune exec test/public.exe -- -only-test <test case name>

To load all the function definitions into the OCaml top-level run the following command within the top-level (REPL):

  #use_output "dune ocaml top";;

The following are the relevant files for your code:

To submit your assignment, create a zip file of a DIRECTORY named project1-handin containing ONLY the warmup.ml file. Then submit that file to the appropriate folder on D2L.

Notes on OCaml

OCaml is a lot different than languages you are used to working with in other courses. Here are some points to consider:

Here are some additional notes about this particular project:

Turning in the Assignment

To submit your assignment, create a zip file of a DIRECTORY named project1-handin containing ONLY the these files:

Then submit that file to the appropriate folder on D2L.

Grading Criteria

Grading (out of 60 points):

Academic Integrity

Please carefully read the Computer Science Academic Integrity Policy. Any evidence of impermissible cooperation on projects, use of disallowed materials or resources, or unauthorized use of computer accounts, will be considered academic dishonesty. Lack of knowledge of the policies will not be considered as a defense for violating them.