072 effect branch multifire with terminal

✓ Passing This code compiles and runs correctly.

Code

// Test: multi-fire effect-branch pump WITH terminal — the canonical iterator shape.
//
// `count_up(start: 0, end: 3)` yields three `! each` operations (i = 0, 1, 2),
// then returns `| done 3`. Consumer handles each yield by printing the index,
// and handles the terminal by printing the total count. This is the smallest
// program that exercises BOTH branch kinds together at runtime: yielding conts
// lower into the synthesized Handlers struct, terminal conts drive the
// post-call switch/extract. Proves partition logic doesn't drop either path.

~import "$std/io"

~pub event count_up { start: usize, end: usize }
! each usize
| done usize

~proc count_up|zig {
    var i = start;
    while (i < end) : (i += 1) {
        each(i);
    }
    return .{ .done = i };
}

~count_up(start: 0, end: 3)
! each i |> std.io:print.blk {
    each {{ i:d }}
}
| done total |> std.io:print.blk {
    done {{ total:d }}
}
input.kz

Actual

each 0
each 1
each 2
done 3

Expected output

each 0
each 1
each 2
done 3

Test Configuration

MUST_RUN