diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-02 16:14:20 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-02 16:14:20 -0400 |
| commit | 6ec8f20fc506af4af5513803fb9a708e4f7b5040 (patch) | |
| tree | 8b952073f6eda5b85c375a65c73647a85fa16f27 /test/for.tm | |
| parent | ecaf34247eb0728a913804033cf302dada417028 (diff) | |
Syntax change: table types are now: `{K=V; default=...}` and tables
use `{:K=V, ...; default=...}`
Diffstat (limited to 'test/for.tm')
| -rw-r--r-- | test/for.tm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/for.tm b/test/for.tm index e3774815..a67e9d5d 100644 --- a/test/for.tm +++ b/test/for.tm @@ -15,14 +15,14 @@ func labeled_nums(nums:[Int] -> Text): return "EMPTY" return result -func table_str(t:{Text,Text} -> Text): +func table_str(t:{Text=Text} -> Text): str := "" for k,v in t: str ++= "$k:$v," else: return "EMPTY" return str -func table_key_str(t:{Text,Text} -> Text): +func table_key_str(t:{Text=Text} -> Text): str := "" for k in t: str ++= "$k," @@ -43,7 +43,7 @@ func main(): >> t := {"key1"="value1", "key2"="value2"} >> table_str(t) = "key1:value1,key2:value2," - >> table_str({:Text,Text}) + >> table_str({:Text=Text}) = "EMPTY" >> table_key_str(t) |
