Skip to main content
1 vote
2 answers
134 views

I once read this Python implementation of Y-combinator in a legacy code deposit: def Y_combinator(f): return (lambda x: f(lambda *args: x(x)(*args)))( lambda x: f(lambda *args: x(x)(*args))...
PkDrew's user avatar
  • 2,301
0 votes
2 answers
173 views

I see this in wiki: Y' = SSK(S(K(SS(S(SSK))))K) And I understand why it corresponds to this lambda expression Y' = (λab.aba) (λab.a(bab)) But I don't know how can this be the same as X = λa.(λx.xx)(...
ypa y yhm's user avatar
  • 219
2 votes
1 answer
326 views

I'm watching a lecture SICP 7A and struggling to understand "Define Lisp as Y combinator (time 1:16:15 )" I think I understood that expt ( calculating exponential of a number like x^n ) can ...
codeDog's user avatar
  • 53
0 votes
2 answers
346 views

In Chapter 9 of The Little Schemer, the authors introduce the Y-combinator and the penultimate question asks: "What is (Y Y)". They answer: "Who knows, but it works very hard." I ...
nmukh's user avatar
  • 15
0 votes
0 answers
77 views

I am trying to write Y combinator as C# delegate so I can understand the types but I am failing. I appreciate any help or hint. Rec<T> Y<T>(ToRec<T> f) { Rec<T> nested(Rec&...
Node.JS's user avatar
  • 1,724
2 votes
1 answer
649 views

I found a implementation of Y-Combinator which supports Fn. However I want to have a version of FnMut. However, FnMut can not be wrapped into Rc, so I wrap them in Rc<RefCell>. The following ...
calvin's user avatar
  • 3,135
1 vote
0 answers
125 views

I am new to studying Lambda Calculus as part of my CompSci degree. In the course material (this is not a graded assignment no worries!) the following beta reduction came up: 𝜆𝑓.𝑊𝑊 →𝛽 𝜆𝑓.𝑓(𝑊𝑊)...
Valerie Berger's user avatar
3 votes
2 answers
119 views

Given a list, e.g. (f: f FALSE (g: g FALSE (h: h TRUE FALSE))), write an operator that removes all leading FALSEs and returns only the tail that starts with TRUE. For this example the operator should ...
Keith's user avatar
  • 1,955
1 vote
2 answers
155 views

In this explanation of Y-combinator (https://mvanier.livejournal.com/2897.html), (define almost-factorial (lambda (f) (lambda (n) (if (= n 0) 1 (* n (f (- n ...
user10206517's user avatar
2 votes
2 answers
104 views

I am attempting to build a clean and neat implementation of recursive-capable lambda self-scoping (which is basically a Y-combinator although I think technically not quite). It's a journey that's ...
Stefan Bauer's user avatar
5 votes
2 answers
653 views

I'm doing some experimenting with y-combinator-like lambda wrapping (although they're not actually strictly-speaking y-combinators, I know), and I've encountered a very odd problem. My code operates ...
Stefan Bauer's user avatar
2 votes
1 answer
233 views

I've been reading about combinators for three days now and I finally started writing them in code (more like copying stuff from places and making sense of things). Here's some code that I'm trying to ...
Arrow's user avatar
  • 369
3 votes
1 answer
505 views

We can define a recursive function, factorial as an example, by YCombinator as follows ;;; elisp ;;; This code works. Thanks to ;;; https://www.diegoberrocal.com/blog/2015/10/12/y-combinator-in-emacs-...
Student's user avatar
  • 400
0 votes
0 answers
97 views

I was watching this talk by Jim Weirich: https://www.youtube.com/watch?v=FITJMJjASUs about implementing the Y-Combinator in Ruby, and following along in Swift. I eventually got to this function, ...
Eduard Lev's user avatar
0 votes
1 answer
232 views

The Y combinator (from the wikipedia article) is defined as: Y = \f.(\x.f(x x)) (\x.f(x x)) so when we call Y on g: Y g = (\f.(\x.f(x x)) (\x.f(x x))) g = (\x.g(x x)) (\x.g(x x)) = g((\x.g(x x)) ...
Mark Karavan's user avatar
  • 2,694

15 30 50 per page
1
2 3 4 5
7