wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run

ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 5ffe50ed02
commit 19fcf60599
459 changed files with 17862 additions and 17603 deletions

View file

@ -4,17 +4,19 @@ property Catch {
fish: int = 0
}
event Landed { fish: int }
var landed: int = 0
var last: Catch = null
@On(Landed) handler Count { landed += fish }
export state FishingState {
landed: int = 0
last: Catch = null
}
@On(Landed) handler Count(fishing_st: mut FishingState) { fishing_st.landed += fish }
function catch_new(n: int) -> Catch {
let c = new Catch
c.fish = n
return c
}
export function fishing_day() -> int {
last = catch_new(3)
emit Landed(fish: last.fish)
export function fishing_day(fishing_st: mut FishingState) -> int {
fishing_st.last = catch_new(3)
emit Landed(fish: fishing_st.last.fish)
emit Landed(fish: 4)
return landed
return fishing_st.landed
}