Skip to content

Instantly share code, notes, and snippets.

@qiuyujx
Created October 4, 2020 12:12
Show Gist options
  • Save qiuyujx/2ceaed3ea92b8eec32947193c68d7e58 to your computer and use it in GitHub Desktop.
Save qiuyujx/2ceaed3ea92b8eec32947193c68d7e58 to your computer and use it in GitHub Desktop.
# Original Function
f = (lambda x: x((lambda x: x(lambda x: x))(x)))(lambda x: x)
# Reduced confusion
f = (
lambda a: a(
(
lambda b: b(lambda c: c)
)(a)
)
)(lambda d: d)
# Re-write into normal functions
def _a(a):
return a(_b)(a)
def _b(b):
return b(_c)
def _c(c):
return c
def _d(d):
return d
def f(x):
return _a(_d)(x)
# Next step: Derive f(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment