add damn4.rkt
[lambda.git] / damn4.rkt
diff --git a/damn4.rkt b/damn4.rkt
new file mode 100644 (file)
index 0000000..65fb49e
--- /dev/null
+++ b/damn4.rkt
@@ -0,0 +1,17 @@
+#lang racket
+
+; thanks to Ken!
+
+(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-with-current-continuation
+        (lambda (k)
+          (cons (lambda (prop) prop)
+                (lambda () (k (cons (lambda (prop) (list 'bad prop))
+                                    (lambda () 'id)))))))))
+  (let ((assert (car pragma))
+        (damn   (cdr pragma)))
+    (assert (list 'the 'student 'read 'the (damn) 'book))))
+