✓
Passing This code compiles and runs correctly.
Code
// The store is a PURE-Koru surface: this whole program — new, the reference
// reactive-attach with a guard, and writes — is a `.k` file with no `~` anywhere.
// The tildes in the .kz store tests were vestigial; nothing about the store's
// surface requires them.
import std/io
import std/store
std/store:new(game) { hp: 0[i64] }
std/store(game)
! hp h when h < 10 |> std/io:print.ln("Low hp {{ h:d }}")
std/store:stored { game.hp: 5 }
std/store:stored { game.hp: 15 }
std/store:stored { game.hp: 3 }
Actual
Low hp 5
Low hp 3
Expected output
Low hp 5
Low hp 3
Flows
flow ~new click a branch to expand · @labels scroll to their anchor
new (expr: game, source: hp: 0[i64])
flow ~std/store click a branch to expand · @labels scroll to their anchor
std/store (game)
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: game.hp: 5)
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: game.hp: 15)
flow ~stored click a branch to expand · @labels scroll to their anchor
stored (source: game.hp: 3)
Test Configuration
MUST_RUN