diff options
| author | Cody <cody@codyq.dev> | 2023-06-25 14:35:24 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-06-25 14:35:24 -0500 |
| commit | 6a59bf6d5345fbe2487e1cc36c36aa6884fcc39d (patch) | |
| tree | b16908fb454553f8be3220af1890f5ecc452fd05 /examples/hello.sloth | |
| parent | def8adfcb9a9572f4e030990626a0d08377118bd (diff) | |
| download | sloth-6a59bf6d5345fbe2487e1cc36c36aa6884fcc39d.tar.gz | |
brain damage
Diffstat (limited to 'examples/hello.sloth')
| -rw-r--r-- | examples/hello.sloth | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/examples/hello.sloth b/examples/hello.sloth index a955e66..5deb0fc 100644 --- a/examples/hello.sloth +++ b/examples/hello.sloth @@ -1,11 +1,13 @@ -foreign fn example(arg: Int) Void; +# foreign fn example(); -fn main() { - var i: Int = 10; - var j: Int = 1.0 - 1; - while i > j { - i = i - 1; - } - example(i); +foreign fn foo() Int; +foreign fn bar(y: Int, z: Int) Float; + +fn main() Int { + foo(); + foo(); + foo(); + bar(5, 8 * 3 + foo()); + return 7 + 5; } |
