- Implement function declaration and call - Change the precalculated variable stack positions to contain the offset from the end instead of the absolute position. This is important for passing fun args on the stack - Add the ability to offset the stackframes. This is used to delete the stack where the fun args have been stored before the block executes - Implement exit type for blocks in interpreter. This is used to get the return values and propagate them where needed - Add recursive fibonacci examples
6 lines
90 B
Python
6 lines
90 B
Python
def fib(n):
|
|
if n <= 1:
|
|
return n
|
|
return fib(n-1) + fib(n-2)
|
|
|
|
print(fib(30)) |