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:
parent
d490d4f9f1
commit
3eda72e8c2
172 changed files with 3094 additions and 2966 deletions
|
|
@ -1,13 +1,13 @@
|
|||
# a/index.ludic - uses b, and writes b's global from outside it
|
||||
module a
|
||||
export function a_run() -> int {
|
||||
b_count = b_count + 1
|
||||
export function a_run(b_st: mut BState) -> int {
|
||||
b_st.b_count = b_st.b_count + 1
|
||||
return b_run() + c_one()
|
||||
}
|
||||
export function a_two() -> int {
|
||||
return 2
|
||||
}
|
||||
export function a_bump() -> void {
|
||||
let r = b_rec
|
||||
export function a_bump(b_st: mut BState) -> void {
|
||||
let r = b_st.b_rec
|
||||
r.n = r.n + 1
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
# b/index.ludic - uses a back: a and b are a cycle
|
||||
module b
|
||||
export var b_count: int = 0
|
||||
export state BState {
|
||||
b_count: int = 0
|
||||
b_rec: Tally = new Tally
|
||||
}
|
||||
export property Tally {
|
||||
n: int = 0
|
||||
}
|
||||
export var b_rec: Tally = new Tally
|
||||
export function b_run() -> int {
|
||||
return a_two() + c_one()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue