pub fn fori_loop<B: Backend, C: Tree<B>>(
lo: impl Into<I32<B>>,
hi: impl Into<I32<B>>,
body: impl Fn(I32<B>, C) -> C,
init: C,
) -> CExpand description
for i in lo..hi { state = body(i, state) } (lax.fori_loop). The
bounds are Rust integers or values. On Trace, as in JAX, this is a
scan when both bounds are static, and a while otherwise.