The code was a user contribution. We fixed it in the next release by fixing the current implementation rather than using start/after/forth which might be slower. do_all_with_index (action: PROCEDURE [ANY, TUPLE [G, INTEGER]]) is -- Apply `action' to every item, from first to last. -- `action' receives item and its index. -- Semantics not guaranteed if `action' changes the structure; -- in such a case, apply iterator to clone of structure instead. require action_not_void: action /= Void local t: TUPLE [G, INTEGER] i, j, nb: INTEGER l_area: like area do from create t i := 0 j := lower nb := capacity - 1 l_area := area until i > nb loop t.put (l_area.item (i), 1) t.put (j, 2) action.call (t) j := j + 1 i := i + 1 end end