4 assert (+: [10, 20, 30]) == 60
7 assert (+: empty_ints) == none
9 assert (+: [10, 20, 30]) or 0 == 60
11 assert (+: empty_ints) or 0 == 0
13 assert (_max_: [3, 5, 2, 1, 4]) == 5
15 assert (_max_.abs(): [1, -10, 5]) == -10
17 assert (_max_: [Foo(0, 0), Foo(1, 0), Foo(0, 10)])! == Foo(x=1, y=0)
18 assert (_max_.y: [Foo(0, 0), Foo(1, 0), Foo(0, 10)])! == Foo(x=0, y=10)
19 assert (_max_.y.abs(): [Foo(0, 0), Foo(1, 0), Foo(0, 10), Foo(0, -999)])! == Foo(x=0, y=-999)
21 say("(or) and (and) have early out behavior:")
22 assert (or: i == 3 for i in 9999999999999999999999999999)! == yes
24 assert (and: i < 10 for i in 9999999999999999999999999999)! == no
26 assert (<=: [1, 2, 2, 3, 4])! == yes
28 assert (<=: empty_ints) == none
30 assert (<=: [5, 4, 3, 2, 1])! == no
32 assert (==: ["x", "y", "z"]) == no
33 assert (==.length: ["x", "y", "z"]) == yes
34 assert (+.length: ["x", "xy", "xyz"]) == 6
36 assert (+.abs(): [1, 2, -3]) == 6