aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/DESIGN.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/DESIGN.md b/doc/DESIGN.md
index 37ca82a..7781cd1 100644
--- a/doc/DESIGN.md
+++ b/doc/DESIGN.md
@@ -92,7 +92,7 @@ const main = fn() !void {
## Structures and instances
```
-struct User {
+const User = struct {
name: str,
age: i32,
level = 1 // default value is 1 and type is i32
@@ -124,7 +124,7 @@ const main = fn {
## Named parameters
Functions call be called with arguments in position that matches the parameters or by using the names of the parameters.
```
-struct User {
+const User = struct {
name: str,
age: i32,
level: i32
@@ -165,7 +165,7 @@ doesn't change location after realloc, which would be the case for pointers.
```
const ArrayList = @import("std.array.ArrayList")
-struct User {
+const User = struct {
name: str,
level: i32
}