TGViewer
Лаборатория Математики и Программирования Сергея Бобровского Лаборатория Математики и Программирования Сергея Бобровского @lambda_brain · 1.41K subscribers
Post #1773 790
Ого.

Is the Y Combinator 3rd order / in lambda calculus ?

Клод 3.7 =>
Yes, the Y Combinator is indeed a third-order function in lambda calculus.
...

Клод 4, Опус 4 =>
The Y combinator is not 3rd order - it's actually a 2nd order function (also called a higher-order function).
Y = λf.(λx.f (x x)) (λx.f (x x))
The Y combinator is a 2nd order function that enables recursion in lambda calculus by finding fixed points of functions. It's one of the most famous examples of a 2nd order function, but it doesn't reach the 3rd order level since it doesn't manipulate other higher-order functions.

-- Y can work with different orders
factorial :: (Int -> Int) -> Int -> Int -- 2nd order input
factorial f n = if n == 0 then 1 else n * f (n-1)
higherOrder :: ((Int -> Int) -> Int -> Int) -> (Int -> Int) -> Int -> Int -- 3rd order input


Abstracted type is 2nd-order: When we look at Y's type signature abstractly:
Y :: (a -> a) -> a
This type itself is 2nd-order.

So you're correct that while Y's abstracted type signature is 2nd-order, its behavior is order-polymorphic - it can operate uniformly across different function orders due to the polymorphic type variable a.
  • 🤔 35
  • 🤯 10
  • 😁 3
  • 👏 1
More from @lambda_brain
  1. Oct 5, 2026Мнения экспертов по индустрии разработки игр в целом можете при желании найти сами на ютуб…
  2. Oct 5, 2026Просили пояснить за (M)PF геймдев ↑ Сложно сегодня придумать более сложное бизнес-направле…
  3. Oct 5, 2026. Облако драгоценностей за неделю. скоро зима (с) Приватный клуб. В жизни любого проекта н…
  4. Oct 1, 2026Ребята спрашивают, ну ок, моё скромное мнение. у вас где-нибудь можно прочитать ваше мнени…
  5. Sep 30, 2026Ладно, вот вам база, почему так трудно переучиваться с императивного/объектного стиля коди…
  6. Sep 30, 2026Ну, с Днём Рунета! Многие годы Рунет был эталонным примером свободы, а сегодня превратился…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →