Next: srfi sets-and-bags theory, Previous: srfi sets-and-bags copy, Up: srfi sets-and-bags [Index]
NOTE The following three predicates do not obey the trichotomy law and therefore do not constitute a total order on sets.
Return #t if each set or bag contains the same
elements.
(import (vicare) (srfi :113) (srfi :114))
(bag=? (bag fixnum-comparator 1 2 2 3)
(bag fixnum-comparator 1 2 2 3))
⇒ #t
(bag=? (bag fixnum-comparator 1 2 3)
(bag fixnum-comparator 1 2 2 3))
⇒ #f
Return #t if each set or bag, other than the last, is a
proper subset of the following set or bag; return #f
otherwise.
(import (vicare) (srfi :113) (srfi :114))
(bag<? (bag fixnum-comparator 1 2 3)
(bag fixnum-comparator 1 2 2 3))
⇒ #t
(bag<? (bag fixnum-comparator 1 2 2 3)
(bag fixnum-comparator 1 2 3))
⇒ #f
Return #t if each set or bag, other than the last, is a
proper superset of the following set or bag; return #f
otherwise.
(import (vicare) (srfi :113) (srfi :114))
(bag>? (bag fixnum-comparator 1 2 3)
(bag fixnum-comparator 1 2 2 3))
⇒ #f
(bag>? (bag fixnum-comparator 1 2 2 3)
(bag fixnum-comparator 1 2 3))
⇒ #t
Return #t if each set or bag, other than the last, is a
subset of the following set or bag; return #f
otherwise.
(import (vicare) (srfi :113) (srfi :114))
(bag<=? (bag fixnum-comparator 1 2 3)
(bag fixnum-comparator 1 2 2 3))
⇒ #t
(bag<=? (bag fixnum-comparator 1 2 2 3)
(bag fixnum-comparator 1 2 3))
⇒ #f
Return #t if each set or bag, other than the last, is a
superset of the following set or bag; return #f
otherwise.
(import (vicare) (srfi :113) (srfi :114))
(bag>=? (bag fixnum-comparator 1 2 3)
(bag fixnum-comparator 1 2 2 3))
⇒ #f
(bag>=? (bag fixnum-comparator 1 2 2 3)
(bag fixnum-comparator 1 2 3))
⇒ #t
Next: srfi sets-and-bags theory, Previous: srfi sets-and-bags copy, Up: srfi sets-and-bags [Index]