aboutsummaryrefslogtreecommitdiff
path: root/test/reductions.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-04 17:06:09 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-04 17:06:09 -0400
commit0b8074154e2671691050bdb3bcb33245625a056c (patch)
tree1410e0c4e05c6372e876cd08f16d117e12868f41 /test/reductions.tm
parentfadcb45baf1274e06cfe37b87655b9146aa52874 (diff)
First working compile of refactor to add explicit typing to declarations
and support untyped empty collections and `none`s
Diffstat (limited to 'test/reductions.tm')
-rw-r--r--test/reductions.tm7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/reductions.tm b/test/reductions.tm
index 840a3b3c..4f33bb20 100644
--- a/test/reductions.tm
+++ b/test/reductions.tm
@@ -4,13 +4,14 @@ func main():
>> (+: [10, 20, 30])
= 60?
- >> (+: [:Int])
+ >> empty_ints : [Int] = []
+ >> (+: empty_ints)
= none : Int
>> (+: [10, 20, 30]) or 0
= 60
- >> (+: [:Int]) or 0
+ >> (+: empty_ints) or 0
= 0
>> (_max_: [3, 5, 2, 1, 4])
@@ -36,7 +37,7 @@ func main():
>> (<=: [1, 2, 2, 3, 4])!
= yes
- >> (<=: [:Int])
+ >> (<=: empty_ints)
= none : Bool
>> (<=: [5, 4, 3, 2, 1])!