You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python's for-else construct as described for example in section 4.4, here, is sometimes very useful. (The idea is that the else clause will be executed after the loop completes normally, but not if we break out of the loop.) Could something similar be added to Julia?
As an example, code like:
converged=truefor i=1:n
if!isapprox(y[i],ynew[i])
converged=falsebreakendendif converged
return y
end
could become:
for i=1:n
if!isapprox(y[i],ynew[i])
breakendelsereturn y
end
The text was updated successfully, but these errors were encountered:
Python's for-else construct as described for example in section 4.4, here, is sometimes very useful. (The idea is that the else clause will be executed after the loop completes normally, but not if we break out of the loop.) Could something similar be added to Julia?
As an example, code like:
could become:
The text was updated successfully, but these errors were encountered: