diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-04-12 13:09:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-04-12 13:09:31 -0400 |
| commit | 6c01eef851439549018267fdc439e4884af0c624 (patch) | |
| tree | 0599dd071b8a5effb67e6a87ed1c34777eb8d8c7 /test/reductions.tm | |
| parent | 17cb6ffd88c4464c513b045f4b06c4e6e46e8f22 (diff) | |
Introducing the main() function
Diffstat (limited to 'test/reductions.tm')
| -rw-r--r-- | test/reductions.tm | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/test/reductions.tm b/test/reductions.tm index e6b78539..6ed7823f 100644 --- a/test/reductions.tm +++ b/test/reductions.tm @@ -1,16 +1,18 @@ ->> (+) [10, 20, 30] -= 60 +struct Foo(x,y:Int) ->> (_max_) [3, 5, 2, 1, 4] -= 5 +func main() + >> (+) [10, 20, 30] + = 60 ->> (_max_:abs()) [1, -10, 5] -= -10 + >> (_max_) [3, 5, 2, 1, 4] + = 5 -struct Foo(x,y:Int) ->> (_max_) [Foo(0, 0), Foo(1, 0), Foo(0, 10)] -= Foo(x=1, y=0) ->> (_max_.y) [Foo(0, 0), Foo(1, 0), Foo(0, 10)] -= 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) + >> (_max_:abs()) [1, -10, 5] + = -10 + + >> (_max_) [Foo(0, 0), Foo(1, 0), Foo(0, 10)] + = Foo(x=1, y=0) + >> (_max_.y) [Foo(0, 0), Foo(1, 0), Foo(0, 10)] + = 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) |
