equal
deleted
inserted
replaced
221 val accesses_bal: ('a -> 'a) * ('a -> 'a) * 'a -> int -> 'a list |
221 val accesses_bal: ('a -> 'a) * ('a -> 'a) * 'a -> int -> 'a list |
222 |
222 |
223 (*orders*) |
223 (*orders*) |
224 val rev_order: order -> order |
224 val rev_order: order -> order |
225 val make_ord: ('a * 'a -> bool) -> 'a * 'a -> order |
225 val make_ord: ('a * 'a -> bool) -> 'a * 'a -> order |
|
226 val eq_ord: ('a -> order) -> 'a -> bool |
226 val int_ord: int * int -> order |
227 val int_ord: int * int -> order |
227 val string_ord: string * string -> order |
228 val string_ord: string * string -> order |
228 val fast_string_ord: string * string -> order |
229 val fast_string_ord: string * string -> order |
229 val option_ord: ('a * 'b -> order) -> 'a option * 'b option -> order |
230 val option_ord: ('a * 'b -> order) -> 'a option * 'b option -> order |
230 val prod_ord: ('a * 'b -> order) -> ('c * 'd -> order) -> ('a * 'c) * ('b * 'd) -> order |
231 val prod_ord: ('a * 'b -> order) -> ('c * 'd -> order) -> ('a * 'c) * ('b * 'd) -> order |
1076 (*assume rel is a linear strict order*) |
1077 (*assume rel is a linear strict order*) |
1077 fun make_ord rel (x, y) = |
1078 fun make_ord rel (x, y) = |
1078 if rel (x, y) then LESS |
1079 if rel (x, y) then LESS |
1079 else if rel (y, x) then GREATER |
1080 else if rel (y, x) then GREATER |
1080 else EQUAL; |
1081 else EQUAL; |
|
1082 |
|
1083 fun eq_ord ord xy = |
|
1084 case ord xy |
|
1085 of EQUAL => true |
|
1086 | _ => false; |
1081 |
1087 |
1082 val int_ord = Int.compare; |
1088 val int_ord = Int.compare; |
1083 val string_ord = String.compare; |
1089 val string_ord = String.compare; |
1084 |
1090 |
1085 fun fast_string_ord (s1, s2) = |
1091 fun fast_string_ord (s1, s2) = |