Re: [racket-dev] using the Y combinator to...

2010-08-04 Thread The Configurator
So it seems I understood it correctly. My implementation of a Y-like combinator, (define (y f) ((lambda (x) (f (delay (x x (lambda (x) (f (delay (x x)) works well - except that the combinated function needs to call ((force f) ...) instead of (f ...) Guess I just missed the part where Hal m

Re: [racket-dev] using the Y combinator to...

2010-08-04 Thread Matthias Felleisen
SICP's treatment of the Y combinator is uninformed by existing programming language theory (1960s and 70s stuff) and is therefore wrong. To their credit, they allude to the problem with words such as normal-forms, reduction, and applicative etc. That's wrong too but at least it warns readers of

Re: [racket-dev] using the Y combinator to...

2010-08-04 Thread Jay McCarthy
Look up the difference between the call by name and call by value Y combinator. Jay On Wed, Aug 4, 2010 at 10:20 AM, The Configurator wrote: > I'll hijack the thread since I've been meaning to ask about the Y > combinator. > From SICP I've seen that the Y combinator is the function > (define (y

Re: [racket-dev] using the Y combinator to...

2010-08-04 Thread The Configurator
I'll hijack the thread since I've been meaning to ask about the Y combinator. >From SICP I've seen that the Y combinator is the function (define (y f) ((lambda (x) (f (x x))) (lambda (x) (f (x x) This makes mathematical sense, since (y f) = ((lambda (x) (f (x x))) (lambda (x) (f (x x

Re: [racket-dev] using the Y combinator to...

2010-07-31 Thread Robby Findler
The use of the Y combinator (as opposed to the built-in forms of recursion) seems to be hacking around the ability for Ruby methods to be redefined more than anything? Robby On Sat, Jul 31, 2010 at 8:54 PM, Shriram Krishnamurthi wrote: > ...provide a mis-feature that the language thoughtfully l

[racket-dev] using the Y combinator to...

2010-07-31 Thread Shriram Krishnamurthi
...provide a mis-feature that the language thoughtfully left out: http://www.eecs.harvard.edu/~cduan/technical/ruby/ycombinator.shtml (The bit about "lexical" scoping in Ruby is also neat. It says that deep down, Ruby really is the same as JavaScript and Python.) Shriram ___