( Print View )
[Texts & Links]
HW#4 --- last modified November 05 2021 13:52:28.
Due date: Nov 17
Files to be submitted:
Purpose: To gain experience with functional programming and learn more about types.
Related Course Outcomes:
The main course outcomes covered by this assignment are:
CLO9 -- Understand type systems.
CLO11 -- Produce programs in a functional programming language.
This assignment consists of written exercises and a coding exercises. I want you to put answers to the written exercises below in a file Hw4.pdf which should be included in the Hw4.zip file you submit. In addition, you should have a readme.txt file listing the team mates you had for the assignment. Remember to receive any credit you must work in a single group (not two groups) with at most three people (can have smaller groups) in the group. Please remember the maximum upload size is 10Mb, so if your PDF contains images make sure to scale/compress them. I.e., BMP bad (uncompressed), jpg, png, etc good (compressed).
I'd like you to do the following problems, for coding problems I have indicated the file name of the file I'd like you to have in your ZIP folder:
- Write a tail recursive procedure in Scheme for the bang-bang operator: n!! Here 1!! is 1, 2!! = 2, and if `n > 2`, `n!! = (n-2)!! times n`. Put this in the file bang-bang.scm.
- Problem 6.32 out of the book.
- Problem 6.41 out of the book.
- Problem 7.2 out of the book.
- Problem 7.3 out of the book.
- Problem 7.9 except for Rust. Put this in a file queue.rs. This should be compilable as rustc queue.rs and when executed should run at least 5 tests of enqueue/dequeue items of different types.
- Problem 8.14 out of the book.
- Problem 11.6 out of the book. Put this in a file log-min.scm
- Problem 11.7 out of the book. Put this in a file rotation-filter.scm
- Problem 11.8 out of the book. Put this in a file permutation.scm
|Each problem is worth 1pt graded on a (0 not correct, 0.5 partially correct, 1 totally correct) scale