• Home
  • Queen's University
  • Operating Systems
  • Haskell Programming Assignment Guidelines

Haskell Programming Assignment Guidelines

CISC 360 Assignment 2 due Friday, 2021-10-08 at 11:59pm, via onQ Jana Dunfield October 1, 2021 Reminder: All work submitted must be your own. Late policy: Assignments submitted up to 24 hours late (that is, by 11:59 pm the following day) will be accepted without penalty. Assignments submitted more than 24 hours late will not be accepted, except with an accommodation or a consideration granted according to policy. 0 Document your code Some of this assignment is a "fill-in-the-blanks" assignment, so you will not need to document much. However, if you need to write a helper function, you need to write a comment that explains what the function does. 0 Strive for simplicity You should try to find a simple solution. You do not have to find the simplest solution to get full marks, but you should not have an excessively complicated solution. Marks may be deducted if your solution is too complicated. If you are worried about whether your solution is too complicated, contact the instructor. 0 Be careful with library functions Haskell has a rather large built-in library. This assignment is not about how to find library functions, but about how to use some of the core features of Haskell. You will not receive many marks if you just call a library function that solves the whole problem. The point is to solve the problem yourself. If you are not sure whether you are calling a library function that solves the whole problem, contact the instructor. Note that if we suggest a library function, you may certainly use it. (The only way I know to avoid this issue is to craft problems that are complicated and arbitrary, such that no library function can possibly solve them. I don't like solving complicated and arbitrary problems, and you probably don't either.) 0 IMPORTANT: Your file must compile Your file must load ( : load in GHCi) successfully, or we will subtract 30% from your mark. If you are halfway through a problem and run out of time, comment out the code that is causing :load to fail by surrounding it with {- ... - }, and write a comment describing what you were trying to do. We can often give (partial) marks for evidence of progress towards a solution, but we need the file to load and compile. a2, Jana Dunfield, CISC 360, Fall 2021 1 2021/10/1 §1 Add your student ID 1 Add your student ID The file a2. hs will not compile until you add your student ID number by writing it after the =: · Your student ID: student_id :: Integer student_id = You do not need to write your name. When we download your submission, onQ includes your name in the filename. 2 'rewrite' Haskell has a built-in function ord, with the type ord : : Char -> Int When applied to a Char, the ord function returns the ASCII code corresponding to that Char. For example, ord 'A' returns 65. Your task is to implement