✓
Passing This code compiles and runs correctly.
Code
// FRONTIER (RED — the MULTI-CELL store question, parked): nested captures
// where each captured block updates its OWN cell by field-name routing.
// Spelling migrated to block form 2026-06-12; semantics are the open store
// design (see 320_034 for the routing problem, 320_038 for explicit
// binding-qualified routing).
~import std/io
~import std/control
const std = @import("std");
~tor print-results { outer-val: i32, inner-val: i32 }
~proc print-results|zig {
std.debug.print("outer={d}, inner={d}\n", .{outer_val, inner_val});
}
~capture { oval: 0[i32] }
! as outer |> capture { ival: 0[i32] }
! as inner |> captured { ival: inner.ival + 10 }
| captured ires |> captured { oval: outer.oval + ires.ival }
| captured final |> print-results(outer-val: final.oval, inner-val: 10)
Supporting Files
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"a.out/1.0.0": {
"runtime": {
"a.out.dll": {}
}
}
}
},
"libraries": {
"a.out/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}{
"runtimeOptions": {
"tfm": "net8.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}~proc print-results|cs {
__koru_stdout_write($"outer={outer_val}, inner={inner_val}\n");
}Actual
outer=10, inner=10
Expected output
outer=10, inner=10
Flows
flow ~capture click a branch to expand · @labels scroll to their anchor
capture (source: oval: 0[i32])
Test Configuration
MUST_RUN