Sets and bags compatible with SRFI 113.
(set comparator . elements)
(bag comparator . elements)
(set-unfold stop? mapper successor seed comparator)
(bag-unfold stop? mapper successor seed comparator)
(set-contains? set element)
(bag-contains? bag element)
(set-disjoint? set1 set2)
(bag-disjoint? bag1 bag2)
(set-member set element default)
(bag-member bag element default)
(set-element-comparator set)
(bag-element-comparator bag)
(set-adjoin set . elements)
(bag-adjoin bag . elements)
(set-replace set element)
(bag-replace bag element)
(set-delete set . elements)
(bag-delete bag . elements)
(set-delete-all set elements)
(bag-delete-all bag elements)
(set-search! set element failure success)
(bag-search! bag element failure success)
(set-find predicate set failure)
(bag-find predicate bag failure)
(set-count predicate set)
(bag-count predicate bag)
(set-every? predicate set)
(bag-every? predicate bag)
(set-map proc comparator set)
(bag-map proc comparator bag)
(set-filter predicate set)
(bag-filter predicate bag)
(set-remove predicate set)
(bag-remove predicate bag)
(set-partition predicate set)
(bag-partition predicate bag)
(list->set comparator lst)
(list->bag comparator lst)
(set-intersection set . sets)
(set-difference set . sets)
(bag-intersection bag . bags)
(bag-difference bag . bags)
(bag-element-count bag element)
(bag-for-each-unique proc bag)
(bag-fold-unique proc nil bag)
(bag-decrement! bag element count)
(alist->bag comparator alist)