1.1.1 The Major FSet Types

FSet provides four major types: sets, maps, seqs, and bags. Sets are the most basic: a set is an unordered collection of unique elements. (FSet imposes an ordering, but this is a standard ordering FSet uses for its own purposes, and can’t be changed for a particular set instance.) Maps are perhaps the most useful: a map, like a hash table, associates each of a set of keys with a unique value. Seqs are FSet’s sequences; I use a shortened form of the word "sequence" because sequence is, of course, already a CL type name. And finally, bags (another term is "multisets") are somewhat like sets except that a bag remembers the number of times each element has been added to it.

The examples assume one is typing to a REPL. User input is shown in bold. To follow along, which I highly recommend, assuming you have installed and loaded FSet, first do this:

> (in-package fset2-user)