- enum<? enum0 enum1 enum …procedure
- enum>? enum0 enum1 enum …procedure
- enum<=? enum0 enum1 enum …procedure
- enum>=? enum0 enum1 enum …procedure
These predicates return #t if their arguments are enums whose ordinals are in increasing, decreasing, non-decreasing, and non-increasing order respectively, and #f otherwise. It is an error unless all of the arguments belong to the same enum type.
(enum<? (enum-ordinal->enum color 0) (enum-ordinal->enum color 1)) ⇒ #t (enum>? (enum-ordinal->enum color 2) (enum-ordinal->enum color 1)) ⇒ #t (enum>=? (enum-ordinal->enum color 2) (enum-ordinal->enum color 1) (enum-ordinal->enum color 1)) ⇒ #t