✓
Passing This code compiles and runs correctly.
Code
// MIRROR of 670_010_capture_under_flow_head: a `capture` fold relocated into an
// imported module.
//
// capture is invoked BARE as the keyword it is, and it rewrites its containing
// flow rather than appending a declaration — the site-local class. It is also
// the most-used transform in the corpus after io, so a boundary fault here
// would reach nearly every module anyone writes.
import app/lib
app/lib:run()
Supporting Files
import std/io
pub tor run {}
run = capture { n: 0[i64] }
! as acc |> captured { n: acc.n + 1 }
| captured r |> std/io:print.ln("n={{ r.n:d }}")
Actual
n=1
Expected output
n=1
Flows
flow ~run click a branch to expand · @labels scroll to their anchor
run
Test Configuration
MUST_RUN