Assignment 5

For this assignment we will refactor some stateful OCaml code to use a state monad.

  • Answer the code and written questions in this zip file for your assignment.
  • Like assignment 1-4, we are giving you a skeleton to fill in. Your answers will go in the file assignment5/src/monads.ml with a discussion question in assignment5/src/discussion.txt. You may modify assignment5/src/monads.mli to expose your extra credit solution.
  • Note that we provide a template for tests, but we are not going to grade your tests or coverage as the code here is simple, and it is primarily a conceptual assignment.

Submission and Grading

  • As usual, run a final dune clean; dune build and then upload _build/default/assignment5.zip to Gradescope.