Exercises for Week 08

Exercise 00

  1. The index of concepts for this week is in a separate chapter. Peruse it and make sure that its entries make sense to you (otherwise, click on them to check them out).
  2. The lecture notes start with updates (Chapter Lecture Notes, updates). Make sure to check them out regularly, as they reflect the development of the lecture.
  3. Do take the time to peruse the lecture notes of this week and to reproduce their OCaml content.

Mandatory exercises

  • Exercise 00: perusing the index and checking the updates
  • Exercise 02: implementing list predicates using match-expressions
  • Exercise 04: studying properties of list concatenation
  • Exercise 05: implementing a triplicating function over lists
  • Exercise 06: implementing list_copy as an instance of list_map
  • Exercise 07: about the essence of list_map
  • Exercise 08: exhibiting an expression of a given type
  • Exercise 09: unzipping a list of pairs into a pair of lists
  • Exercise 11: designing a function list_mapi that is to list_map what string_mapi is to string_map
  • Exercise 13: eliciting a given trace for set_union
  • Exercise 16: eliciting a given trace for set_intersection
  • Exercise 19: beefing up a unit-test function with set-theoretic identities

Optional exercise

  • Exercise 23 implementing the Cartesian product of four sets

Version

Created [10 Jan 2023]

Table Of Contents

Previous topic

Programming with lists

Next topic

Index of concepts for Week 08