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>
12 lines
398 B
Text
12 lines
398 B
Text
# friend_of.ludic — L3: `friend module lab of bank` sees bank's private names and no other module's;
|
|
# a test harness reaches inside exactly what it tests. `friend module lab` alone still sees all.
|
|
#
|
|
# Running it prints: 7 7
|
|
import "bank"
|
|
program FriendOf {
|
|
friend module lab of bank
|
|
entry (bank_st: mut BankState) {
|
|
add(bank_st, 7)
|
|
print(`{bank_st.balance} {total(bank_st)}`)
|
|
}
|
|
}
|