✓
Passing This code compiles and runs correctly.
Code
// MIRROR of 390_070_step_basic: `std/kernel:step` wrapping a `kernel:self` in
// the continuation chain, inside an imported module.
//
// step is the kernel-native iteration form — it wraps the ops that follow it
// rather than expanding at its own site, so it pins whether a transform that
// claims its DESCENDANTS still finds them when the whole chain is a module tor
// body.
import app/lib
app/lib:run()
Supporting Files
import std/kernel
import std/io
std/kernel:shape(Body) {
mass: f64,
}
pub tor run {}
run = std/kernel:init(Body) {
{ mass: 1.0 },
{ mass: 2.0 },
{ mass: 3.0 },
}
| kernel k |> std/kernel:step(0..3)
| step |> std/kernel:self { k.mass += 0.2 }
| computed c |> std/io:print.blk {
mass[0]={{ c[0].mass:f }} mass[1]={{ c[1].mass:f }} mass[2]={{ c[2].mass:f }}
}
Actual
mass[0]=1.5999999999999999 mass[1]=2.6000000000000005 mass[2]=3.6000000000000005
Expected output
mass[0]=1.5999999999999999 mass[1]=2.6000000000000005 mass[2]=3.6000000000000005
Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_RUN