diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 18:01:19 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 18:01:19 -0400 |
| commit | 68bedd3c23757a8576e77f38e38ddcf9ecd26d19 (patch) | |
| tree | 86ce1610143efc43453f50d3413925797601c48a /examples | |
| parent | 0815de981c683cac7dbac082ee14c11894089f31 (diff) | |
Use colons instead of '=' for tables (e.g. {1: 2})
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/learnxiny.tm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/learnxiny.tm b/examples/learnxiny.tm index d5d3a8d6..a03db6c9 100644 --- a/examples/learnxiny.tm +++ b/examples/learnxiny.tm @@ -114,7 +114,7 @@ func main() assert table["xxx"] or 0 == 0 # Empty tables require specifying the key and value types: - empty_table : {Text=Int} + empty_table : {Text:Int} # Tables can be iterated over either by key or key,value: for key in table @@ -290,7 +290,7 @@ func demo_enums() assert "$my_shape" == "Circle(1)" == yes - assert {my_shape="nice"} == {Shape.Circle(1)="nice"} + assert {my_shape: "nice"} == {Shape.Circle(1): "nice"} func demo_lambdas() # Lambdas, or anonymous functions, can be used like this: |
