(pfds set)

set? : any -> boolean returns #t if the object is a set, #f otherwise

(set-ordering-procedure set)

set-ordering-procedure : set -> (any any -> boolean) returns the ordering procedure used internally by the set.

(make-set <)

make-set : (any any -> boolean) -> set returns a new empty set ordered by the < procedure

(set-member? set element)

set-member? : set any -> boolean returns true if element is in the set

(set-insert set element)

set-insert : set any -> set returns a new set created by inserting element into the set argument

(set-remove set element)

set-remove : set element -> set returns a new set created by removing element from the set

(set-size set)

set-size : set -> non-negative integer returns the number of elements in the setset<=? : set set -> boolean returns #t if set1 is a subset of set2, #f otherwise, i.e. if all elements of set1 are in set2.

(set<? set1 set2)

set<? : set set -> boolean returns #t if set1 is a proper subset of set2, #f otherwise. That is, if all elements of set1 are in set2, and there is at least one element of set2 not in set1.

(set>=? set1 set2)

set>=? : set set -> boolean returns #t if set2 is a subset of set1, #f otherwise.

(set>? set1 set2)

set>? : set set -> boolean returns #t if set2 is a proper subset of set1, #f otherwise.

(set=? set1 set2)

set=? : set set -> boolean returns #t if every element of set1 is in set2, and vice versa, #f otherwise.

subset?

subset? : set set -> boolean same as set<=?

proper-subset?

proper-subset? : set set -> boolean same as set<?

(set-map proc set)

set-map : (any -> any) set -> set returns the new set created by applying proc to each element of the set

(set-fold proc base set)

set-fold : (any any -> any) any set -> any returns the value obtained by iterating the procedure over each element of the set and an accumulator value. The value of the accumulator is initially base, and the return value of proc is used as the accumulator for the next iteration.

(list->set list <)

list->set : Listof(any) (any any -> any) -> set returns the set containing all the elements of the list, ordered by <.

(set->list set)

set->list : set -> Listof(any) returns all the elements of the set as a list

(set-union set1 set2)

set-union : set set -> set returns the union of set1 and set2, i.e. contains all elements of set1 and set2.

(set-intersection set1 set2)

set-intersection : set set -> set returns the intersection of set1 and set2, i.e. the set of all items that are in both set1 and set2.

(set-difference set1 set2)

set-difference : set set -> set returns the difference of set1 and set2, i.e. the set of all items in set1 that are not in set2.