Besonderhede van voorbeeld: 8284719049117908032

Metadata

Author: WikiMatrix

Data

English[en]
In fact, there are many possible definitions for this FIX operator, the simplest of them being: Y := λg.(λx.g (x x)) (λx.g (x x)) In the lambda calculus, Y g is a fixed-point of g, as it expands to: Y g (λh.(λx.h (x x)) (λx.h (x x))) g (λx.g (x x)) (λx.g (x x)) g ((λx.g (x x)) (λx.g (x x))) g (Y g) Now, to perform our recursive call to the factorial function, we would simply call (Y G) n, where n is the number we are calculating the factorial of.
Portuguese[pt]
Na verdade, há muitas definições possíveis para este operador FIX, o mais simples delas é: Y := λg.(λx.g (x x)) (λx.g (x x)) Em lambda cálculo, Y g é um ponto-fixo de g, a medida que se expande a: Y g λh.((λx.h (x x)) (λx.h (x x))) g (λx.g (x x)) (λx.g (x x)) g ((λx.g (x x)) (λx.g (x x))) g (Y g) Agora, para executar nossa chamada recursiva para a função fatorial, teríamos simplesmente que chamar (Y G) n, onde n é o número que estamos a calcular o fatorial de n .

History

Your action: