2121
2222(* various utility functions *)
2323open List
24- open Unix
24+ open Unix
2525
2626(* ****************************************
2727 * Integer operations
@@ -50,7 +50,7 @@ let lowest_terms n m =
5050 (1 ,0 )
5151 else
5252 let nn = (abs n) in let mm = m * (n / nn)
53- in let mpos =
53+ in let mpos =
5454 if (mm > 0 ) then (mm mod nn)
5555 else (mm + (1 + (abs mm) / nn) * nn) mod nn
5656 and d = gcd nn (abs mm)
@@ -84,7 +84,7 @@ let rec pow_mod x n p =
8484 else x * (pow_mod x (n - 1 ) p) mod p
8585
8686(* *****************************************
87- * auxiliary functions
87+ * auxiliary functions
8888 ******************************************)
8989let rec forall id combiner a b f =
9090 if (a > = b) then id
@@ -93,11 +93,11 @@ let rec forall id combiner a b f =
9393let sum_list l = fold_right (+ ) l 0
9494let max_list l = fold_right (max) l (- 999999 )
9595let min_list l = fold_right (min) l 999999
96- let count pred = fold_left
96+ let count pred = fold_left
9797 (fun a elem -> if (pred elem) then 1 + a else a) 0
9898let remove elem = List. filter (fun e -> (e != elem))
9999let cons a b = a :: b
100- let null = function
100+ let null = function
101101 [] -> true
102102 | _ -> false
103103let for_list l f = List. iter f l
@@ -134,12 +134,12 @@ let rec suchthat a pred =
134134(* print an information message *)
135135let info string =
136136 if ! Magic. verbose then begin
137- let now = Unix. times ()
137+ let now = Unix. times ()
138138 and pid = Unix. getpid () in
139139 prerr_string ((string_of_int pid) ^ " : " ^
140140 " at t = " ^ (string_of_float now.tms_utime) ^ " : " );
141141 prerr_string (string ^ " \n " );
142- flush Pervasives . stderr;
142+ flush Stdlib . stderr;
143143 end
144144
145145(* iota n produces the list [0; 1; ...; n - 1] *)
0 commit comments