procedure Op (Container : in Container_Type) is
C : Cursor := Container.First; --
factory
E : Element_Type;
begin
while Has_Element (C) loop
E := Element (C);
exit when Predicate (E);
Do_Something (E);
Next (C); --or: C := Next (C);
end loop;
end Op;