diff options
| author | Baitinq <[email protected]> | 2025-02-15 10:56:08 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-02-15 11:00:04 +0100 |
| commit | fa6d9cdf57db4244a331035d35d1b962630e3ae1 (patch) | |
| tree | d3926279eb046bbc11d4102ba8b336d037596da1 /examples/8.src | |
| parent | Examples: Update initial example with types (diff) | |
| download | interpreter-fa6d9cdf57db4244a331035d35d1b962630e3ae1.tar.gz interpreter-fa6d9cdf57db4244a331035d35d1b962630e3ae1.tar.bz2 interpreter-fa6d9cdf57db4244a331035d35d1b962630e3ae1.zip | |
Feature: Introduce initial support for function return types
Diffstat (limited to 'examples/8.src')
| -rw-r--r-- | examples/8.src | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/8.src b/examples/8.src index 33323f7..67c7dc3 100644 --- a/examples/8.src +++ b/examples/8.src @@ -1,4 +1,4 @@ -let fib = (n) => { +let fib = (n) => i64 { if n == 0 { return 0; }; @@ -8,7 +8,7 @@ let fib = (n) => { return fib(n-2) + fib(n-1); }; -let main = () => { +let main = () => i64 { let result = fib(7); print(result); return result; |