aboutsummaryrefslogtreecommitdiff
path: root/test/reductions.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-02 22:34:35 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-11-02 22:34:35 -0400
commit92a593b80fe935eb21615dc45b4d7868b254bec6 (patch)
tree029e43ff46abc4bd86000c5a90900511ea99fcf3 /test/reductions.tm
parent0b7a0dd043a4c7ccfc924d618508d1edc0115e2f (diff)
Support reductions for comparison operators like == and <
Diffstat (limited to 'test/reductions.tm')
-rw-r--r--test/reductions.tm17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/reductions.tm b/test/reductions.tm
index 7bfe212a..a844081f 100644
--- a/test/reductions.tm
+++ b/test/reductions.tm
@@ -27,8 +27,17 @@ func main():
= Foo(x=0, y=-999)
!! (or) and (and) have early out behavior:
- >> (or: i == 3 for i in 9999999999999999999999999999)!
- = yes
+ >> (or: i == 3 for i in 9999999999999999999999999999)!
+ = yes
- >> (and: i < 10 for i in 9999999999999999999999999999)!
- = no
+ >> (and: i < 10 for i in 9999999999999999999999999999)!
+ = no
+
+ >> (<=: [1, 2, 2, 3, 4])!
+ = yes
+
+ >> (<=: [:Int])
+ = !Bool
+
+ >> (<=: [5, 4, 3, 2, 1])!
+ = no