Collaborating with Git and Forgejo
The goal of this assignment is to familiarise yourself with some standard Common Lisp constructs for doing the kinds of things that you are already familiar with doing in Python.
Repeat the first ungraded assignment on Indexing but this time using Common Lisp.
A secondary goal is to familiarise yourself with The Common Lisp Cookbook, in particular the sections highlighted below.
The Common Lisp Cookbook
- Use
read-lineto read line by line from*standard-input* - Use format to write formatted output to
*standard-output*and/or to a file - Hash tables, Lisp's dictionaries
- Opening a File
- Reading a file into a string or a list of lines
- Iterate's for loop
- Looping over a vector or string
- Looping over a hash table
- Making your Lisp file runnable
Opening a file to read
(with-open-file (in "input.txt" :direction :input) ...)
Opening a file to write
(with-open-file (in "output.txt" :direction :output :if-exists :supersede) ...)
Reading a file line by line into a list
(ql:quickload :iterate) (use-package :iterate) (iter (for line in-file "input.txt" using #'read-line) (collect line))
Teams for the assignment
[
("Giorgia", "Zsuzsa"),
("Komari", "Wester"),
("Mats", "Margherita"),
("Camille", "Indigo"),
("Natalia", "Ana"),
("Skye", "Montasser"),
("Irissa", "Shelly"),
("Romane", "Julie"),
]