aboutsummaryrefslogtreecommitdiff
path: root/test/corecursive_func.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-04-28 14:58:55 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-04-28 14:58:55 -0400
commit3c0a8f0b899a343f43caf9c95147b2cf77a7b525 (patch)
treeb7193a8021ef9ab57c71319ecad797bf51849025 /test/corecursive_func.tm
parent5910998a19aab5dab2c761aea946cfbb09a37918 (diff)
Syntax tweak: use ':' for blocks
Diffstat (limited to 'test/corecursive_func.tm')
-rw-r--r--test/corecursive_func.tm14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/corecursive_func.tm b/test/corecursive_func.tm
index 22ffd627..a5c13dde 100644
--- a/test/corecursive_func.tm
+++ b/test/corecursive_func.tm
@@ -1,15 +1,15 @@
-func ping(x:Int)->[Text]
- if x > 0
+func ping(x:Int)->[Text]:
+ if x > 0:
return ["ping: {x}"] ++ pong(x-1)
- else
+ else:
return ["ping: {x}"]
-func pong(x:Int)->[Text]
- if x > 0
+func pong(x:Int)->[Text]:
+ if x > 0:
return ["pong: {x}"] ++ ping(x-1)
- else
+ else:
return ["pong: {x}"]
-func main()
+func main():
>> ping(3)
= ["ping: 3", "pong: 2", "ping: 1", "pong: 0"]