wip(0.S3): packages and examples migrated in one run - ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:02:45 +03:00
parent d490d4f9f1
commit 3eda72e8c2
172 changed files with 3094 additions and 2966 deletions

View file

@ -4,11 +4,13 @@
# Running it prints: 42 42
import "bank"
program Visible {
var heard: int = 0
@On(Deposited) handler Heard { heard += amount }
entry {
deposit(30)
deposit(12)
print(`{total()} {heard}`)
state VisibleState {
heard: int = 0
}
@On(Deposited) handler Heard(visible_st: mut VisibleState) { visible_st.heard += amount }
entry (bank_st: mut BankState, visible_st: VisibleState) {
deposit(bank_st, 30)
deposit(bank_st, 12)
print(`{total(bank_st)} {visible_st.heard}`)
}
}