From: Ramakrishnan Muthukrishnan Date: Sat, 10 Dec 2011 19:02:37 +0000 (+0530) Subject: solution to 4.15 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/biz/vdrive?a=commitdiff_plain;h=59bfb9c3fd1b3f3639b0c13ea899c2c42b67bb71;p=sicp.git solution to 4.15 --- diff --git a/src/sicp/ex4_15.rkt b/src/sicp/ex4_15.rkt new file mode 100644 index 0000000..689a1c9 --- /dev/null +++ b/src/sicp/ex4_15.rkt @@ -0,0 +1,16 @@ +#lang racket + +(define (run-forever) + (run-forever)) + +(define (try p) + (if (halts? p p) + (run-forever) + 'halted)) + +#| + +Now, if you run (try try) then, we check if (try try) would halt. If it halts, then we run forever, else we return. +This is contradictory to the assumption. + +|# \ No newline at end of file