Please enable javascript to use this site.
· OpenID

  1. Hallå Kitteh (clacke@social.heldscal.la)'s status on Thursday, 07-Dec-2017 07:43:35 UTC Hallå Kitteh Hallå Kitteh
    > In the end, we’ll have constructed a programming language out of the lambda calculus, and we’ll arrive at the factorial of 5 in the lambda calculus, as embedded in Python:

    > (((lambda f: (((f)((lambda f: ((lambda z: (((f)(((f)(((f)(((f)(((f)
    (z)))))))))))))))))))((((((lambda y: ((lambda F: (((F)((lambda x:
    (((((((y)(y)))(F)))(x)))))))))))((lambda y: ((lambda F: (((F)((lambda x:
    (((((((y)(y)))(F)))(x)))))))))))))((lambda f: ((lambda n: ((((((((((((
    lambda n: (((((n)((lambda _: ((lambda t: ((lambda f: (((f)((lambda void:
    (void)))))))))))))((lambda t: ((lambda f: (((t)((lambda void: (void)))))
    ))))))))((((((lambda n: ((lambda m: (((((m)((lambda n: ((lambda f:
    ((lambda z: (((((((n) ((lambda g: ((lambda h: (((h)(((g)(f)))))))))))
    ((lambda u: (z)))))((lambda u: (u)))))))))))))(n))))))) (n)))((lambda f:
    ((lambda z: (z)))))))))((lambda _: ((((lambda n: (((((n) ((lambda _: ((
    lambda t: ((lambda f: (((f)((lambda void: (void))))))))))))) ((lambda t:
    ((lambda f: (((t)((lambda void: (void))))))))))))) ((((((lambda n:
    ((lambda m: (((((m)((lambda n: ((lambda f: ((lambda z: (((((((n) ((lambda
    g: ((lambda h: (((h)(((g)(f)))))))))))((lambda u: (z)))))((lambda u:
    (u)))))))))))))(n)))))))((lambda f: ((lambda z: (z)))))))(n)))))))))
    ((lambda _: ((lambda t: ((lambda f: (((f)((lambda void: (void)))))))))))
    ))((lambda _: ((lambda f: ((lambda z: (((f)(z)))))))))))((lambda _: (((
    (((lambda n: ((lambda m: ((lambda f: ((lambda z: (((((m)(((n)(f)))))(z)
    ))))))))))(n)))(((f) ((((((lambda n: ((lambda m: (((((m)((lambda n:
    ((lambda f: ((lambda z: (((((((n) ((lambda g: ((lambda h: (((h)(((g)(f)
    ))))))))))((lambda u: (z)))))((lambda u: (u)))))))))))))(n)))))))(n)))
    ((lambda f: ((lambda z: (((f) (z))))))))))))))))))))))))(lambda x:x+1)(0)

    > Run the above in your Python interpreter. It’s equal to 120.

    And you wonder why people want to separate Church and state.

    http://matt.might.net/articles/python-church-y-combinator/