Changed how variables are created

This commit is contained in:
Pasha Bibko
2025-08-04 15:46:19 +01:00
parent a77d5bd129
commit 7e95b7157e
5 changed files with 11 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
func<int> fib(int num)
func<int> fib(int: num)
{
# Base cases #
if (n == 0) { return 0 }
if (n == 1) { return 1 }
# Base cases (temp excluded) #
# if (n == 0) { return 0 } #
# if (n == 1) { return 1 } #
# RECURSION BABYYYY #
return fib(n - 1) + fib(n - 2)
@@ -10,6 +10,6 @@ func<int> fib(int num)
func<int> main()
{
int res = fib(8)
int: res = fib(8)
return res == 21
}

View File

@@ -1,11 +1,11 @@
func<int> add(int a, int b)
func<int> add(int: a, int: b)
{
return a + b
}
func<int> main()
{
int c = add(3, 4)
int: c = add(3, 4)
if (c == 7)
{
return 0