Commit c789aed5 authored by David Bühler's avatar David Bühler
Browse files

[offsetmap] Simplifies iter_offset.

parent 3c11e8a7
......@@ -527,16 +527,11 @@ module Make (V : module type of Offsetmap_lattice_with_isotropy) = struct
match t with
| Empty -> ()
| Node (max, _, _, _, _, r, m, v, _) ->
begin
let abs_max = max +~ o in
f (o, abs_max) (v, m, r);
let no, nt, nz =
try move_right o t z
with End_reached ->
abs_max, Empty, z (* End the recursion at next iteration *)
in
aux_iter no nt nz
end
let abs_max = max +~ o in
f (o, abs_max) (v, m, r);
match move_right o t z with
| no, nt, nz -> aux_iter no nt nz
| exception End_reached -> ()
in
aux_iter o n z
;;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment