Skip to content

Instantly share code, notes, and snippets.

@kamocyc
Created February 11, 2021 06:17
Show Gist options
  • Save kamocyc/41d94a2d91f80aa90535ed6b5bef021a to your computer and use it in GitHub Desktop.
Save kamocyc/41d94a2d91f80aa90535ed6b5bef021a to your computer and use it in GitHub Desktop.
Y combinator (factorial applied)
=LAMBDA(f,LAMBDA(x,f(LAMBDA(v,x(x)(v))))(LAMBDA(x,f(LAMBDA(v,x(x)(v))))))(LAMBDA(fact,LAMBDA(x,IF(x=0,1,x*fact(x-1)))))(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment