+ (let ((pragma
+ ; An ordered pair whose first component is the assertion
+ ; operator, a unary function, and whose second component
+ ; is the meaning of "damn", a thunk.
+ (call/cc (lambda (k)
+ (cons (lambda (p) p)
+ (lambda () (k (cons (lambda (p) (cons (cons 'side-effect 'bad) p))
+ (lambda () 'id)))))))))
+ (let ((assert (car pragma)) ; this binds assert to the first element of the pair pragma
+ (damn (cdr pragma))) ; this binds damn to the second element of the pair pragma
+ (assert (cons (cons 'the 'man) (cons 'read (cons 'the (cons (damn) 'book)))))))
+
+We won't do much to explain this. We'll just leave it for you to chew on.
+
+
+
+
+ #lang racket
+ ;(define damn (lambda () 'id))
+ (define damn (lambda () (call/cc (lambda (k)
+ ; (k 'id)
+ (print "Something's bad")
+ (k 'id)
+ ))))
+
+ (list (list 'the (list (damn) 'man))
+ (list 'read
+ (list 'the (list (damn) 'book))))
+
+
+
+
+
+ #lang racket
+ (require racket/control)
+
+ (define damn0 (lambda ()
+ 'id))
+
+ (define damn1 (lambda ()
+ (cons '("side effect" bad)
+ 'id)))
+
+ (define damn2 (lambda () (shift k
+ (cons '("side effect" bad)
+ (list (k 'id))))))
+
+ (define damn3 (lambda () (shift k
+ (list (k 'id)
+ '("side effect" bad)))))