From 92a593b80fe935eb21615dc45b4d7868b254bec6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 2 Nov 2024 22:34:35 -0400 Subject: Support reductions for comparison operators like == and < --- test/reductions.tm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'test') 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 -- cgit v1.2.3