From 6a59bf6d5345fbe2487e1cc36c36aa6884fcc39d Mon Sep 17 00:00:00 2001 From: Cody Date: Sun, 25 Jun 2023 14:35:24 -0500 Subject: brain damage --- examples/hello.sloth | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'examples') 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; } -- cgit v1.2.3