Assignment 7

Higher-order functions

In this assignment you will continue using the GitHub features we have seen so far, and practice using the standard higher-order functions from the List module.

Instead of instructions in the file itself, this time the instructions are provided in a Markdown document: https://github.com/skiadas/ProgLangAssignments/blob/master/assignment7doc.md

As before, you should NOT specify the types of your functions, but rather let the system figure it all out. This may make the resulting types appear different than what is required, you should make sure that they are indeed the same and that the only difference is because of type aliases. In some cases the system might derive a “more general type” than the expected one, and that is OK.

As in prior assignments, you should not use any functions we have not learned about unless explicitly told to. These assignments are not about learning a number of library functions, but about delving deeply into fundamental building blocks of programming. In this specific assignment, you are asked to use many functions from the List module.

One considerable deviation from previous assignments is that in this assignment you are not allowed to create any recursive functions. You must instead rely on folding and maps to process the relevant lists.

Correctness of the solutions, including the types and whether the code loads, will count for 15 points. Your code MUST load with no errors and have the correct types. Otherwise you will receive 0 for correctness even if most of your functions are correct. Start by creating stubs for all functions so that the tests are at least executed.

Another 5 points will come from style issues, your tests and use of GitHub, including Milestones and Labels, issues and closing those issues via commits. Keep creating issues for the various parts of the assignment. assigining them to milestones and tagging them with labels. Create new milestones for each assignment.

  1. You already have created a link to the instructor’s remote repository. You need to download the updated version of the instructor’s repository and merge the changes into yours. The following should do that:
  2. Create a new milestone for this assignment.
  3. Throughout your work, create and close issues via commits as described in the instructions above and in previous homeworks. Make sure to assign each issue to the correct milestone and to give them the correct labels.
  4. You will find two files in this directory:
  5. To “run” your tests, start an OCAML session in the terminal via utop, do:
#use "assignment7sub.ml";;
#use "assignment7tests.ml";;