[r6rs-discuss] A suggestion about LETREC

From: Thomas Lord <lord>
Date: Wed Mar 28 17:16:44 2007

Abdulaziz Ghuloum wrote:
>> One advantage of this is that it would be much easier to create a purely
>> functional subset of Scheme.
>
> How do you do the following functionally?
>
> (letrec ([f (g (lambda () f))])
> f)


Well, f is then given by

    (g (lambda () (g (lambda () (g (lambda () g ...))))))

So what? It makes perfect sense if (define (g x) #t)

I take it (ne -- I assume) that there is some subtlety I'm
missing here but, please, what is it?

-t
Received on Wed Mar 28 2007 - 17:27:04 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC