From: Jim Pryor Date: Tue, 14 Sep 2010 13:29:59 +0000 (-0400) Subject: add damn4.rkt X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=0bec426ca6b6e8672c487a1b9f0a3ef1823d267a;hp=227503eac084d04b374a829310b76ebaec0b2c0e add damn4.rkt Signed-off-by: Jim Pryor --- diff --git a/damn4.rkt b/damn4.rkt new file mode 100644 index 00000000..65fb49ea --- /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)))) +