Skip to content

Commit 81f5b69

Browse files
committed
why create inst?
1 parent 2ea519e commit 81f5b69

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/class.zen

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ mod stdlib;
33
// ZenLang is not object oriented - therefore it doesn't have classes
44
// But you can make something similar
55
fn class_new {
6-
let inst = {
6+
return {
77
"add_a" = class_add_a,
88
"add_b" = class_add_b,
99
"print" = class_print,
1010
"a" = 0,
1111
"b" = 0
1212
};
13-
return inst;
1413
}
1514

1615
fn class_add_a n {

0 commit comments

Comments
 (0)