June 5, 2026
No loops, just chaos
No Let, No Rec, No Problem: A Gentler Introduction to the Y and Z Combinators
Math brain teaser sparks "too clever" vs "actually brilliant" comment war
TLDR: The article shows how to make a function repeat itself in JavaScript without using the usual tools, turning a simple math task into a mind-bending puzzle. Commenters split hard between "beautiful computer science lesson" and "why make this so confusing," with one show-off dropping an even more extreme version for laughs and bragging rights.
A quirky coding article tried to do something that sounds almost deliberately impossible: calculate a factorial — basically multiplying a number down to 1 — without using normal tools like loops, self-calling functions, or even simple declarations. Instead of taking the obvious route, the writer walks readers through increasingly sneaky workarounds until landing in the strange, brain-bending world of the Y and Z combinators, a famously abstract trick for getting repetition without naming the function itself. For some readers, this was catnip. For others, it was the intellectual version of being handed a Rubik’s Cube during a fire drill.
And the comments? That’s where the real show began. One camp was thrilled to see a dense, old-school computer science idea get a softer introduction. satvikpendem practically begged people not to scroll past, lamenting that many commenters seemed to have no clue what the article was even about and warning it might vanish from the front page too soon. Meanwhile, p4bl0 fired off the classic complaint: why all the ceremony? Why not just explain the underlying math idea directly instead of hiding behind a made-up challenge?
Then came the flex posts. Trung0246 dropped a wildly unreadable but impressive TypeScript version in pure symbolic form, basically the comment-section equivalent of showing up to a bake sale with a seven-tier wedding cake. The mood was a mix of admiration, confusion, and comic exhaustion: some people saw elegance, others saw sorcery, and everyone saw at least a little drama.
Key Points
- •The article sets up a JavaScript challenge to compute factorial without loops, recursion, or declarations.
- •A standard recursive factorial implementation is presented first as the target behavior but rejected because it directly calls itself.
- •A mutual-recursion version using `factf` and `factg` is shown to work, then rejected because indirect recursion still violates the challenge.
- •The article introduces `factgen(self, n)` and defines factorial through self-application, using `factgen(factgen, n)` to emulate recursion.
- •It identifies the pattern `g(g, ...)` as the core mechanism for preserving self-reference and motivating fixed-point combinators.