File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1252,9 +1252,9 @@ struct
12521252 | [] , _ -> [] | _ ,[] -> xs
12531253 | _ , _ ->
12541254 let min_xs = fst (List. hd xs) in
1255- let max_xs = snd ( List. hd ( List. rev xs)) in
1255+ let max_xs = snd @@ BatList. last xs in
12561256 let min_ys = fst (List. hd ys) in
1257- let max_ys = snd ( List. hd ( List. rev ys)) in
1257+ let max_ys = snd @@ BatList. last ys in
12581258 let min_range,max_range = range ik in
12591259 let min = if Ints_t. compare min_xs min_range == 0 then min_ys else min_xs in
12601260 let max = if Ints_t. compare max_xs max_range == 0 then max_ys else max_xs in
@@ -1282,7 +1282,9 @@ struct
12821282
12831283 let minimal = function [] -> None | (x , _ )::_ -> Some x
12841284
1285- let maximal xs = xs |> List. rev |> (function [] -> None | (_ , y )::_ -> Some y)
1285+ let maximal = function
1286+ | [] -> None
1287+ | xs -> let last = BatList. last xs |> snd in Some last
12861288
12871289 let of_interval ik (x , y ) = norm ik @@ Some (x, y)
12881290
You can’t perform that action at this time.
0 commit comments