21341
|
1 |
structure ROOT =
|
|
2 |
struct
|
|
3 |
|
|
4 |
structure Nat =
|
|
5 |
struct
|
|
6 |
|
|
7 |
datatype nat = Zero_nat | Suc of nat;
|
|
8 |
|
22386
|
9 |
fun less_nat n (Suc m) = less_eq_nat n m
|
21994
|
10 |
| less_nat n Zero_nat = false
|
22386
|
11 |
and less_eq_nat (Suc n) m = less_nat n m
|
|
12 |
| less_eq_nat Zero_nat m = true;
|
21341
|
13 |
|
|
14 |
end; (*struct Nat*)
|
|
15 |
|
|
16 |
structure Codegen =
|
|
17 |
struct
|
|
18 |
|
|
19 |
fun in_interval (k, l) n =
|
21994
|
20 |
(Nat.less_eq_nat k n) andalso (Nat.less_eq_nat n l);
|
21341
|
21 |
|
|
22 |
end; (*struct Codegen*)
|
|
23 |
|
|
24 |
end; (*struct ROOT*)
|