Created
August 29, 2023 09:24
-
-
Save qexat/b9fda441401883149e798948d979a250 to your computer and use it in GitHub Desktop.
totally lisp
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
| import os | |
| __annotations__ = globals() | |
| fib: \ | |
| (lambda n: | |
| n if n <= 1 else fib(n - 2) + fib(n - 1)) | |
| main: \ | |
| (lambda: | |
| (list | |
| (map | |
| (lambda i: print(fib(i)) | |
| ,range(10)) | |
| ) | |
| ,os.EX_OK)[-1] # last value = return value | |
| ) | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Snippet on Compiler Explorer