Yahoo Web Search

Search results

  1. The Y combinator is an implementation of a fixed-point combinator in lambda calculus. Fixed-point combinators may also be easily defined in other functional and imperative languages. The implementation in lambda calculus is more difficult due to limitations in lambda calculus. The fixed-point combinator may be used in a number of different areas:

  2. Aug 13, 2018 · The Y-combinator. Like loop, we can encode rec in lambda calculus too! But we call rec ‘Y’ in lambda calculus this time, because this encoding is the famous Y-combinator that lets you have recursion in any languages: Y = λf.(λx.f (x x))(λx.f (x x)) Let’s verify that it behaves like rec by giving it an input g:

  3. Jul 16, 2011 · A Y-combinator is a "functional" (a function that operates on other functions) that enables recursion, when you can't refer to the function from within itself. In computer-science theory, it generalizes recursion, abstracting its implementation, and thereby separating it from the actual work of the function in question.

    Code sample

    public static Func<T, TResult> Y<T, TResult>(Func<Func<T, TResult>, Func<T, TResult>> F) {
      return
      t =>
      F(
      Y(F)...
  4. Oct 15, 2019 · This version of mkrec_nice correspond directly to the traditional inscrutable presentation of Z, which is written in lambda calculus as: Z = λg. (λr. g (λy. r r y)) (λr. g (λy. r r y)) The real Y combinator. The real Y combinator is actually a little simpler than the Z combinator that we say above.

  5. all integers. f (x) = 4/x. 2, -2. f (x) = x+1. none in the domain of integers. An amazing fact is that in lambda-calculus, every function has a fixed point, though it may not correspond to anything "useful". (For example, the fixed point of λx.x+1 is a lambda-expression that doesn't correspond to an integer.)

  6. People also ask

  7. K I a b = ( λ λ x y. x) ( λ x. x) a b = ( λ x. x) b = b. Thus K I = λ a b. b = λ λ 0. In other words, we have combined K and I to produce a closed lambda term distinct to either one. (Thanks to De Bruijn indices, we can see at a glance they differ.) Moreover, no variables were needed: we merely applied K to I.

  8. Feb 24, 2022 · The above code outputs 120, as expected. (The Y combinator in the code differs from the one at the start of the question. This is because the one at the start would cause a recursion depth exception. They are equivalent in the lambda calculus nonetheless)

  1. People also search for