aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-05 11:51:07 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-05 11:51:07 -0400
commitd8016810263983d68f95efad834a9b664330ab44 (patch)
treec2932a67c0fb0e8f64c2382d735cca7f1c99cd9b /test
parent0d3c8e16bc8acc631ec43c0a9f2f6831a9818376 (diff)
Add early outs for (or) and (and) reducers
Diffstat (limited to 'test')
-rw-r--r--test/reductions.tm7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/reductions.tm b/test/reductions.tm
index 97ec4afc..72db3d1b 100644
--- a/test/reductions.tm
+++ b/test/reductions.tm
@@ -16,3 +16,10 @@ func main():
= Foo(x=0, y=10)
>> (_max_.y:abs()) [Foo(0, 0), Foo(1, 0), Foo(0, 10), Foo(0, -999)]
= Foo(x=0, y=-999)
+
+ !! (or) and (and) have early out behavior:
+ >> (or) i == 3 for i in 99999999999999999
+ = yes
+
+ >> (and) i < 10 for i in 99999999999999999
+ = no