Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-11-19 04:54:17 -06:00
commit f086abcea6
789 files changed
+149185

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import std::io;
import lib;
import lib::inner;
def main(): void {
var c := start();
c.bump();
println($"{c.n} {label()} {total()}");
}
module lib;
pub struct counter { pub var n: int; }
def step(): int { return 2; }
pub def counter::bump(&mut this): void { this.n = this.n + step(); }
pub def total(): int { return step() + deeper::extra(); }
module lib::inner;
pub def start(): counter { return counter{ n = step() }; }
pub def label(): string { return "inner"; }
module lib::deeper;
pub def extra(): int { return 5; }