Keep Working, Worker Bee!

9.15.2005

This is an odd, reasonably pointless expression that returns 7 in any R5RS-compliant Scheme implementation:
(let ((x (lambda (z) z)) (y 7))
(let ((x (lambda () x))) y))

This is an infinite loop in any R5RS-compliant Scheme implementation:
(let let ((x (lambda (z) z)) (y 7))
(let ((x (lambda () x))) y))


Gotta love overloaded syntax.

0 Comments:

Post a Comment

<< Home