|
- Y Combinator in Haskell - Stack Overflow
The Y combinator can't be typed using Hindley-Milner types, the polymorphic lambda calculus on which Haskell's type system is based You can prove this by appeal to the rules of the type system I don't know if it's possible to type the Y combinator by giving it a higher-rank type It would surprise me, but I don't have a proof that it's not
- y-combinator in javascript - Stack Overflow
Alternate Y-combinators Here we can build a Y-combinator from the ground up standard definition const Y = f => f (Y (f)) prevent immediate infinite recursion in applicative order language (JS) const Y = f => f (x => Y (f) (x)) remove reference to self using U combinator const U = f => f (f) const Y = U (h => f => f (x => h (h) (f) (x)))
- Fixed point combinator for mutually recursive functions?
The Y* combinator is very useful for defining mutual recursive definitions of monadic parsers, of which I'll blog soon on lambder com , stay tuned ;) -- Lambder Share
- function - Using the Y Combinator in C# - Stack Overflow
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));
- How can I implement Y-Combinator with FnMut in Rust?
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 –
- Y combinator, Infinite types and Anonymous recursion in Haskell
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
|
|
|