diff --git a/bin/migration_scripts/manganese2iron.sh b/bin/migration_scripts/manganese2iron.sh index 9af1cd289a67cc68482633f09927e78ff7c3902c..57295f6c7f7eb6e34cc8e0219ea3b8cbbe79b089 100755 --- a/bin/migration_scripts/manganese2iron.sh +++ b/bin/migration_scripts/manganese2iron.sh @@ -87,7 +87,8 @@ process_file () sedi "$file" \ -e 's/Extlib\.id/Fun.id/g' \ -e 's/Extlib\.swap/Fun.flip/g' \ - -e 's/Extlib\.xor/(<>)/g' + -e 's/Extlib\.xor/(<>)/g' \ + -e 's/Extlib\.iteri/List.iteri/g' # this line left empty on purpose } diff --git a/src/libraries/stdlib/extlib.ml b/src/libraries/stdlib/extlib.ml index 1aaa77b0c0481c2ada7c4554f4414eb325694398..14d3703b43bf91c72e91544dd64b56c1ec164504 100644 --- a/src/libraries/stdlib/extlib.ml +++ b/src/libraries/stdlib/extlib.ml @@ -165,8 +165,6 @@ let opt_of_list = | [a] -> Some a | _ -> raise (Invalid_argument "Extlib.opt_of_list") -let iteri f l = let i = ref 0 in List.iter (fun x -> f !i x; incr i) l - let mapi f l = let res = snd (List.fold_left (fun (i,acc) x -> (i+1,f i x :: acc)) (0,[]) l) diff --git a/src/libraries/stdlib/extlib.mli b/src/libraries/stdlib/extlib.mli index 0335824ac579103d3d13d602f3a9d7e335ad820a..5ae88674815a800449f862bbe93ba65a57aefb50 100644 --- a/src/libraries/stdlib/extlib.mli +++ b/src/libraries/stdlib/extlib.mli @@ -139,11 +139,6 @@ val opt_of_list: 'a list -> 'a option @raise Invalid_argument on lists with more than one argument @since Oxygen-20120901 *) -val iteri: (int -> 'a -> unit) -> 'a list -> unit -(** Same as iter, but the function to be applied take also as argument the - index of the element (starting from 0). Tail-recursive - @since Nitrogen-20111001 *) - val mapi: (int -> 'a -> 'b) -> 'a list -> 'b list (** Same as map, but the function to be applied take also as argument the index of the element (starting from 0). Tail-recursive diff --git a/src/plugins/metrics/gui/metrics_gui_panels.ml b/src/plugins/metrics/gui/metrics_gui_panels.ml index b51ee8ad14930f28ee3f6ed7bee8d9db9372da9a..77b564173ff8ddec5fdb1723b2731fdfb4734658 100644 --- a/src/plugins/metrics/gui/metrics_gui_panels.ml +++ b/src/plugins/metrics/gui/metrics_gui_panels.ml @@ -54,8 +54,8 @@ let display_as_table table_contents (parent:GPack.box) = ~rows:(List.length table_contents) ~homogeneous:true ~packing:parent#pack () in - Extlib.iteri (fun i row -> - Extlib.iteri (fun j text -> + List.iteri (fun i row -> + List.iteri (fun j text -> table#attach ~left:j ~top:i ((GMisc.label ~justify:`LEFT ~text:text ()):>GObj.widget)) row) table_contents ;