Last active
August 22, 2017 22:42
-
-
Save proprietary/ba728d8c430c47d0c64e01917f117f5e to your computer and use it in GitHub Desktop.
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
const Y = f => (x => x(x))(x => f(v => x(x)(v))) | |
// example | |
let factorial = Y(fact => n => n === 1 ? 1 : n*fact(n-1)) | |
factorial(4) // => 24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment