Αποτελέσματα Αναζήτησης
16 Ιουλ 2011 · This means that a y-combinator must be written for any argument count that one needs to use. Below is an example of how the usage and working of a Y-Combinator, in C#. Using a Y-combinator involves an "unusual" way of constructing a recursive function.
19 Ιουν 2022 · In that case the Y combinator is a way to solve that, but I'd recommend to go for the alternative approaches that you're already aware of. The Y combinator is impractical in most languages without lazy evaluation, and especially so in Rust, where it also runs afoul of the ownership model. –
5 Αυγ 2015 · To do this, I thought of using the Lambda Calculus' Y combinator. Here's the first definition: Y = λf.(λx.f(x x))(λx.f(x x)) Here's the reduced definition: Y g = g(Y g) I attempted to write them in C# like this: // Original Lambda Y = f => (new Lambda(x => f(x(x)))(new Lambda(x => f(x(x))))); // Reduced Lambda Y = null; Y = g => g(Y(g));
18 Μαΐ 2011 · In order to learn what a fixed-point combinator is and is used for, I wrote my own. But instead of writing it with strictly anonymous functions, like Wikipedia's example , I just used define: (define combine (lambda (functional) (functional (lambda args (apply (combine functional) args))))
Shortly, Y combinator is a higher order function that is used to implement recursion on lambda expressions (anonymous functions). Check the article How to Succeed at Recursion Without Really Recursing by Mike Vanier - it's one of best practical explanation of this matter I've seen. Also, scan the SO archives: What is a y-combinator?
29 Νοε 2011 · Thankfully the fathers of computing solved this problem ages ago by discovering Fixed-Point Combinators, with the most popular being the Y Combinator. I've made various attempts to get a Y combinator set up, but they can't get past the compiler.
I've recently come across this proposal that wants to add a Y Combinator to the Standard Library, and after reading it, it seems extremely similar to what I am doing here. Unfortunately, the concept of the Y Combinator still doesn't "click" for me - I am missing something and I cannot visualize how to generalize what I did with the self ...
fix2 is a y-combinator (specifically, it is a combinator for functions with two arguments; the first argument is the function (for the purpose of recursion), the second argument is a "proper" function argument). It creates recursive functions. bll::ret(...) appears to create some form of a function object, the body of which is
11 Αυγ 2016 · Y - Combinator . I've been trying to learn about Y - Combinators (an explanation on that would be lovely as well) and came across an example from this wiki. An in depth explanation on the subject would be much appreciated in either Haskell or Python. Pleaaase! Code fix :: (a -> a) -> a fix f = f (fix f) Problem
27 Μαΐ 2016 · I am really new to scheme functional programming. I recently came across Y-combinator function in lambda calculus, something like this Y ≡ (λy.(λx.y(xx))(λx.y(xx))). I wanted to implement it in scheme, i searched alot but i didn't find any implementation which exactly matches the above given structure. Some of them i found are given below: