2 ms·
for i in [0..width[ do for j in [0..height[ do if foo(i, j) then break label outer_loop # The 'break' breaks the 'for i' loop
by rurban 12y ago
for i in [0..width[ do
for j in [0..height[ do
if foo(i, j) then break label outer_loop
# The 'break' breaks the 'for i' loop
end
end label outer_loop
ouch. I see why mathematicians would like that, but programmers are surely annoyed by the open range "[".
And if the target are mathematicians, they surely dont like the verbose do end blocks, instead of {}.
the for loop could be then
∀ x in [0..height[:
if foo(i, j): break outer_loop.
just odd syntax choices.