diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-01-12 16:49:58 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-01-12 16:49:58 -0500 |
| commit | 645d66e0de0f201404d9ad4b210f90c139a247ff (patch) | |
| tree | 08367c3631b928752cde94083bdfe2ae49db0b79 /test/for.tm | |
| parent | b025cf269d2e07e179be4a0e34d936862dc640c2 (diff) | |
Change table syntax to `{key=value}` and `{:K,V}`/`{K,V}`
Diffstat (limited to 'test/for.tm')
| -rw-r--r-- | test/for.tm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/for.tm b/test/for.tm index ae5f786e..e3774815 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," @@ -40,10 +40,10 @@ func main(): >> labeled_nums([:Int]) = "EMPTY" - >> t := {"key1":"value1", "key2":"value2"} + >> 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) |
