1.1 FSet Tutorial

If you are new to FSet, this tutorial will get you up and running quickly. We have just a few preliminaries before we get started. First, this tutorial is addressed to those who have acquired at least some familiarity with Common Lisp; it’s not the place to start for newcomers to the language. Second, you will want to have a copy of FSet running so you can follow along. Assuming you are already using Quicklisp, just do

> (ql:quickload "fset")

This tutorial presents FSet 2; you should be using v2.4.0 or later. If, at the time you read this, Quicklisp is still on v2.2.0, I strongly recommend getting the latest release from either Common-Lisp.net or GitHub. If you clone the repo into ~/quicklisp/local-projects/, Quicklisp will use it automatically. To find out what version Quicklisp is providing, you can do

% grep ^fset ~/quicklisp/dists/quicklisp/releases.txt

FSet 2 added two new packages, fset2 and fset2-user; it also changed the default implementations of sets and maps from the older WB-tree collections to the newer CHAMP collections. The aspect of that change that is relevant to this tutorial is that the CHAMP types print with a double sharpsign, ##; you will see this in the examples below.