Logo
Explore Help
Sign In
xnoe/ocaml-python-interpreter
1
0
Fork 0
You've already forked ocaml-python-interpreter
Code Issues Pull Requests Projects Releases Wiki Activity
ocaml-python-interpreter/recursive.py
Xnoe 66be7b292b Identified the bug!!! Issue with not breaking when finding variable in deep vars, caused recursive function to always default to initial value. Added recursive.py during debug. Updated calc.py somewhat.
2020-09-25 11:31:40 +01:00

11 lines
101 B
Python
Raw Permalink Blame History

def rec(x):
if x == 0:
print("Fin.")
else:
print(str(x))
print(str(x-1))
rec(x-1)
rec(5)
Reference in New Issue View Git Blame Copy Permalink
Powered by Gitea Version: 1.23.3 Page: 56ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API