[plt-scheme] to define, or to let

From: Richard Cleis (rcleis at mac.com)
Date: Thu Mar 18 19:05:22 EST 2004

1) Do these two generate the same code?
2) Which one best contains the spirit of scheme?

(define a-function-using-defines
   (lambda ()
     (define one-variable 3)
     (define another-variable 4)
     (list 3 4))) ; just checking

(define a-function-using-let-list
   (lambda ()
     (let ((one-variable 3)
           (another-variable 4) )
       (list 3 4)))) ; just checking

rac



Posted on the users mailing list.