- enum-set-disjoint? enum-set1 enum-set2procedure
Returns #t if enum-set1 and enum-set2 do not have any enum objects in common, and #f otherwise. It is an error if the members of the enum sets do not belong to the same enum type.
(define reddish (list->enum-set (map (lambda (name) (enum-name->enum color name)) '(red orange)))) (define ~reddish (list->enum-set (map (lambda (name) (enum-name->enum color name)) '(yellow green cyan blue violet)))) (enum-set-disjoint? color-set reddish) ⇒ #f (enum-set-disjoint? reddish ~reddish) ⇒ #t
Note that the following three procedures do not obey the trichotomy law, and cannot be used to define a comparator.