Jump to content

Yellowstone sequence: Difference between revisions

m
Ada: Optimize cursor out
(Ada version)
m (Ada: Optimize cursor out)
Line 193:
else GCD (Right, Left mod Right));
 
function Next return Integer is
is
It : Sequences.Cursor;
begin
N_2 := N_1;
Line 212 ⟶ 210:
end if;
Seq.Insert (N_0);
while Seq.Contains (Min) loop
It := Seq.FindDelete (Min);
exit when It in Sequences.No_Element;
Seq.Delete (It);
Min := Min + 1;
end loop;
211

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.