Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I'm not mistaken, this isn't the full Y combinator yet. It's a partial step towards deriving the full Y combinator.

    (f => (x => x(x))(y => f(x => y(y)(x))))
    (func => n => (n === 0) ? 1 : (n * func(n - 1)))
    (19)
Notice that the ugly func(func)(n-1) recursive call with the proper Y combinator simply became func(n-1).

The full Y combinator is also vastly more mystical and less obvious than the partial step :)



The full Y combinator is presented in the sequel of the current article: http://blog.klipse.tech/lambda/2016/08/10/pure-y-combinator-...


> The full Y combinator is also vastly more mystical and less obvious than the partial step :)

The full Y conbinator simply binds func to func(func) as seen in `(y => f(x => y(y)(x))))`, an easy jump to make and pretty easy to understand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: