Changeset 818 for Deliverables/D2.2/8051/src/utilities/miscPottier.ml
 Timestamp:
 May 19, 2011, 4:03:04 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Deliverables/D2.2/8051/src/utilities/miscPottier.ml
r740 r818 1 2 let rec map3 f al bl cl = 3 let f' ((a, b), c) = f a b c in 4 List.map f' (List.combine (List.combine al bl) cl) 1 5 2 6 let rec max_list = function … … 4 8  [a] > a 5 9  a :: l > max a (max_list l) 10 11 let rec reduce l1 l2 = match l1, l2 with 12  [], _ > (([], []), ([], l2)) 13  _, [] > (([], l1), ([], [])) 14  a :: l1, b :: l2 > 15 let ((common1, rest1), (common2, rest2)) = reduce l1 l2 in 16 ((a :: common1, rest1), (b :: common2, rest2)) 6 17 7 18 let pow a b = … … 43 54 44 55 let foldi f a l = foldi_from_until 0 (List.length l) f a l 56 57 let pos e l = 58 let f i res e' = if e' = e then Some i else res in 59 match foldi f None l with 60  None > raise Not_found 61  Some i > i 45 62 46 63 let iteri f l =
Note: See TracChangeset
for help on using the changeset viewer.