[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Scheme-reports] Buggy definition of BEGIN



On p 56, the definition of BEGIN is buggy:

(define-syntax begin
   (syntax-rules ()
     ((begin exp ...)
     ((lambda () exp ...)))))

because with this definition we get the following error:

   (let ((x 1))
     (begin (define x 2))
     x)                     ===> 1 (ERROR!!)

QED



_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports