Haskell代写-COMPSCI 3MI3-Assignment 10
时间:2021-11-29
COMPSCI 3MI3 : Assignment 10
Fall 2021
Nicholas Moore
Assignments submitted as LATEXgenerated pdfs are eligible for 1 bonus mark, so long as the source file is
provided.
1. (8 points) Pattern Matching Lists
In topic 11, we present a pattern matching mechanism for records. We also present list semantics.
Propose an extension to the matching rules in topic 11 that allows our pattern matching mechanism to
match over lists as well as records.
2. Additional List Operations In topic 11, we discussed lists, and defined a few operations over them.
Propose new terms for the following list operations. You must propose syntax, small step operational
semantics, and typing rules. References for each operation may be found at https://hackage.haskell.
org/package/base-4.16.0.0/docs/Prelude.html
(a) (4 points) List indexing
(b) (4 points) Length
(c) (4 points) Concatenation
(d) (6 points) Filtering
HINT: Follow the style of the existing semantics!


essay、essay代写