Created
August 17, 2020 01:12
-
-
Save sagnibak/d5be5cb3319c1de2ad0590c8332a591f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tco | |
def fac(n, acc=1): | |
if n == 0: | |
return Return(acc) | |
else: | |
return TailCall((n - 1, n * acc)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment