Lisp packaging and pattern matching

The goal of this assignment is to familiarise yourself with Lisp packaging and to get some experience using pattern matching.

  1. Make a package called patterns using cl-project as explained in Packages and Systems
  2. Initialise a git repo in the new patterns directory.
  3. Make sure your package depends on :trivia :named-readtables & :trivia.quasiquote
  4. In your main file, make sure that those packages are in the :use field of define-package
  5. Make sure that you have (in-readtable :fare-quasiquote) at the top of your main.lisp files
  6. Copy into the src/main.lisp several of the functions you wrote for the assignment on Recursion in Lisp (at least one function on lists and one function on binary trees).
  7. Adapt the functions to work with the pattern-matching techniques as we did for my-length in Pattern Matching
  8. Adapt your tests and put them in tests/main.lisp
  9. Make sure that all of your tests pass.

Author: Breanndán Ó Nualláin <o@uva.nl>

Date: 2026-04-16 Thu 09:51