diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 23:37:05 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 23:37:05 -0400 |
| commit | 1a196aa8f724971e531487f9cdd541f7957cfd92 (patch) | |
| tree | 52a36701065ab0e3f7012765c909c3b2a3fd2e49 /docs/structs.md | |
| parent | 4a3db447ce820617a72bdd9fc6217c84c3799bea (diff) | |
Update syntax in docs
Diffstat (limited to 'docs/structs.md')
| -rw-r--r-- | docs/structs.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/structs.md b/docs/structs.md index f075f037..1dfa49c9 100644 --- a/docs/structs.md +++ b/docs/structs.md @@ -21,13 +21,13 @@ Structs can define their own methods that can be called with a `:` or different values that are stored on the type itself. ```tomo -struct Foo(name:Text, age:Int): +struct Foo(name:Text, age:Int) oldest := Foo("Methuselah", 969) - func greet(f:Foo): + func greet(f:Foo) say("Hi my name is $f.name and I am $f.age years old!") - func get_older(f:@Foo): + func get_older(f:@Foo) f.age += 1 ... my_foo := @Foo("Alice", 28) |
