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
struct LoopInitializer endlet
my_dx =LoopInitializer()
if@isdefined dx
my_dx = dx
end
args = (0, my_dx)
cond_fn = (i, my_dx)->beginlocal num_iters =9
i < num_iters +1end
body_fn = (i, my_dx)->beginlocal step_ =1local start_ =1begin
dx =1endif!(my_dx isa LoopInitializer)
my_dx = dx
end
(i +1, my_dx)
endcond_fn(args...), body_fn(args...)
end
The check at the end of body_fn should always be optimized away, I believe.
If there's no obvious problems with this approach I can try add it to the macro, unless someone else would like to?
dx
is not necessarily defined outside the forloopThe text was updated successfully, but these errors were encountered: