Skip to content

Comment on Baking the Y Combinator from Scratchparent

Comments

(Y(f))(x) = f(f(f(...(x)...)))

I think that should be (Y(f))(x) = f(f(f(...)))(x)

Think of f as a function that takes a value and returns a value. Y takes a function and returns a function. Y(f) returns a new function that takes a value and applies f to it, recursively forever, ultimately converging on a value (or infinity).

In your example, f(...) would have to return a function that is then applied to x.

I realize there are no non-function values in LC.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.