ludic/examples/modules/private_kinds.ludic

12 lines
476 B
Text

# private_kinds.ludic — L3: a module's private records and events are its own too. fishing and
# hunting each have a record Catch and an event Landed, with different fields; each module's `new`,
# types, `emit` and `@On` reach its own.
#
# Running it prints: 7 hare
import "kinds/fishing"
import "kinds/hunting"
program PrivateKinds {
entry (fishing_st: mut FishingState, hunting_st: HuntingState) {
print(`{fishing_day(fishing_st)} {hunting_day(hunting_st)}`)
}
}