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

@ -8,15 +8,17 @@ program PortVars {
money: fn() -> int
price: fn(int) -> int
}
var g_money: int = 40
var g_rate: int = 3
function priced(n: int) -> int {
return n * g_rate
state PortvarsState {
g_money: int = 40
g_rate: int = 3
}
bind Purse { money: g_money, price: fn priced }
entry {
function priced(portvars_st: PortvarsState, n: int) -> int {
return n * portvars_st.g_rate
}
bind Purse { money: PortvarsState.g_money, price: fn priced }
entry (portvars_st: mut PortvarsState) {
let a = Purse.money()
g_money += 5
portvars_st.g_money += 5
print(`{a} {Purse.money()} {Purse.price(4)}`)
}
}