diff options
| author | Cody <cody@codyq.dev> | 2023-06-25 23:23:04 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-06-25 23:23:04 -0500 |
| commit | ae4c1af949c7230c07b2a7cc86a2e4031c37f651 (patch) | |
| tree | 28d2f870bc0d6e57234b20bd9c443dc5d8d7f7e1 /examples/hello.sloth | |
| parent | 6a59bf6d5345fbe2487e1cc36c36aa6884fcc39d (diff) | |
| download | sloth-ae4c1af949c7230c07b2a7cc86a2e4031c37f651.tar.gz | |
getting loopy
Diffstat (limited to 'examples/hello.sloth')
| -rw-r--r-- | examples/hello.sloth | 17 |
1 files changed, 8 insertions, 9 deletions
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; } |
