From ae4c1af949c7230c07b2a7cc86a2e4031c37f651 Mon Sep 17 00:00:00 2001 From: Cody Date: Sun, 25 Jun 2023 23:23:04 -0500 Subject: getting loopy --- examples/hello.sloth | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'examples') diff --git a/examples/hello.sloth b/examples/hello.sloth index 5deb0fc..4b99943 100644 --- a/examples/hello.sloth +++ b/examples/hello.sloth @@ -1,13 +1,12 @@ -# foreign fn example(); +foreign fn addz(lhs: Int, rhs: Int) Int; -foreign fn foo() Int; -foreign fn bar(y: Int, z: Int) Float; +fn haiiii() Void {} -fn main() Int { - foo(); - foo(); - foo(); - bar(5, 8 * 3 + foo()); - return 7 + 5; +fn hehehaha() Int { + var x: Int = 0; + while x < 10 { + x = x + 1; + } + return x; } -- cgit v1.2.3