[racket] internal define

From: Dmitry Pavlov (dpavlov at ipa.nw.ru)
Date: Fri Nov 30 12:03:12 EST 2012


I have been forcing myself to use (define) over (let),
following the guide:

So I have come across this strange behavior:

(define (test x)
     (display x)
     (define x 2)
     (display x))
 > (test 1)

while the analogous construct with (let) works as expected:

(define (test1 x)
     (display x)
     (let ((x 2))
       (display x)))
 > (test1 1)

Is there a list of what one can do and what one can not
do with internal define?

Best regards,


Posted on the users mailing list.