Skip to content

Instantly share code, notes, and snippets.

@qexat
Created August 29, 2023 09:24
Show Gist options
  • Select an option

  • Save qexat/b9fda441401883149e798948d979a250 to your computer and use it in GitHub Desktop.

Select an option

Save qexat/b9fda441401883149e798948d979a250 to your computer and use it in GitHub Desktop.
totally lisp
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())
@qexat
Copy link
Author

qexat commented Aug 29, 2023

Snippet on Compiler Explorer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment