008 relay

✓ Passing This code compiles and runs correctly.

Code

input.k

Supporting Files

lib/post.kz
lib/stamps.k

Actual

dispatch 0 sent express
dispatch 0 challenged at the pass — returned to depot
dispatch 0 arrived — seal 0 intact
dispatch 1 arrived — seal 1 intact
dispatch 2 arrived — seal 2 intact
dispatch 3 challenged at the pass — returned to depot
dispatch 3 arrived — seal 3 intact
dispatch 4 sent express
dispatch 4 arrived — seal 4 intact
dispatch 5 arrived — seal 5 intact
dispatch 6 challenged at the pass — returned to depot
dispatch 6 arrived — seal 6 intact
dispatch 7 arrived — seal 7 intact
dispatch 8 sent express
dispatch 8 arrived — seal 8 intact
relay closed: 9 dispatched, 3 turned back, 9 filed

Expected output

dispatch 0 sent express
dispatch 0 challenged at the pass — returned to depot
dispatch 0 arrived — seal 0 intact
dispatch 1 arrived — seal 1 intact
dispatch 2 arrived — seal 2 intact
dispatch 3 challenged at the pass — returned to depot
dispatch 3 arrived — seal 3 intact
dispatch 4 sent express
dispatch 4 arrived — seal 4 intact
dispatch 5 arrived — seal 5 intact
dispatch 6 challenged at the pass — returned to depot
dispatch 6 arrived — seal 6 intact
dispatch 7 arrived — seal 7 intact
dispatch 8 sent express
dispatch 8 arrived — seal 8 intact
relay closed: 9 dispatched, 3 turned back, 9 filed

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (board, source: sent: 0[i64], turned: 0[i64], filed: 0[i64])
subflow ~route click a branch to expand · @labels scroll to their anchor
if (bounced == 0 and @mod(id, 3) == 0)
subflow ~send-all click a branch to expand · @labels scroll to their anchor
for (0..@as(usize, @intCast(n)))
subflow ~run-line click a branch to expand · @labels scroll to their anchor
send-all (n: g)
flow ~open-line click a branch to expand · @labels scroll to their anchor
open-line (n: 9)

Test Configuration

MUST_RUN