Initial Commit
This commit is contained in:
782 files changed
+145156
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import std::io;
|
||||
struct noisy : owning { var id: int; }
|
||||
def noisy::close(&mut this): void { if this.id != 0 { println($"closing {this.id}"); } }
|
||||
def take<Ts...>(xs: Ts...): void { println($"took {xs.length}"); }
|
||||
def pass<Ts...>(xs: Ts...): void {
|
||||
take(...xs);
|
||||
println("passed");
|
||||
}
|
||||
def main(): void {
|
||||
pass(noisy{ id = 1 }, noisy{ id = 2 }, 3);
|
||||
println("done");
|
||||
}
|
||||
Reference in new issue
Block a user