equal
deleted
inserted
replaced
18 exception SAME of unit |
18 exception SAME of unit |
19 |
19 |
20 val nitpick_prefix : string |
20 val nitpick_prefix : string |
21 val curry3 : ('a * 'b * 'c -> 'd) -> 'a -> 'b -> 'c -> 'd |
21 val curry3 : ('a * 'b * 'c -> 'd) -> 'a -> 'b -> 'c -> 'd |
22 val pairf : ('a -> 'b) -> ('a -> 'c) -> 'a -> 'b * 'c |
22 val pairf : ('a -> 'b) -> ('a -> 'c) -> 'a -> 'b * 'c |
23 val int_for_bool : bool -> int |
23 val pair_from_fun : (bool -> 'a) -> 'a * 'a |
|
24 val fun_from_pair : 'a * 'a -> bool -> 'a |
|
25 val int_from_bool : bool -> int |
24 val nat_minus : int -> int -> int |
26 val nat_minus : int -> int -> int |
25 val reasonable_power : int -> int -> int |
27 val reasonable_power : int -> int -> int |
26 val exact_log : int -> int -> int |
28 val exact_log : int -> int -> int |
27 val exact_root : int -> int -> int |
29 val exact_root : int -> int -> int |
28 val offset_list : int list -> int list |
30 val offset_list : int list -> int list |
82 fun curry3 f = fn x => fn y => fn z => f (x, y, z) |
84 fun curry3 f = fn x => fn y => fn z => f (x, y, z) |
83 |
85 |
84 (* ('a -> 'b) -> ('a -> 'c) -> 'a -> 'b * 'c *) |
86 (* ('a -> 'b) -> ('a -> 'c) -> 'a -> 'b * 'c *) |
85 fun pairf f g x = (f x, g x) |
87 fun pairf f g x = (f x, g x) |
86 |
88 |
|
89 (* (bool -> 'a) -> 'a * 'a *) |
|
90 fun pair_from_fun f = (f false, f true) |
|
91 (* 'a * 'a -> bool -> 'a *) |
|
92 fun fun_from_pair (f, t) b = if b then t else f |
|
93 |
87 (* bool -> int *) |
94 (* bool -> int *) |
88 fun int_for_bool b = if b then 1 else 0 |
95 fun int_from_bool b = if b then 1 else 0 |
89 (* int -> int -> int *) |
96 (* int -> int -> int *) |
90 fun nat_minus i j = if i > j then i - j else 0 |
97 fun nat_minus i j = if i > j then i - j else 0 |
91 |
98 |
92 val max_exponent = 16384 |
99 val max_exponent = 16384 |
93 |
100 |