From 7c446ed81af8cdefdc109d809bf19c9ab0d8e98b Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sun, 1 Dec 2013 09:43:45 -0500 Subject: [PATCH] Removing this file because it's nonfree. The terms aren't clear, so I'm just going to get rid of this. Sad, but meh. --- eg/nonfree/halting-problem/halting.hy | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 eg/nonfree/halting-problem/halting.hy diff --git a/eg/nonfree/halting-problem/halting.hy b/eg/nonfree/halting-problem/halting.hy deleted file mode 100755 index 9c33c08..0000000 --- a/eg/nonfree/halting-problem/halting.hy +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env hy - -;; Very much a knockoff (straight port) of Dan Gulotta's 2013 MIT Mystery Hunt -;; puzzle "The Halting Problem". His Copyright terms are unclear, so presume -;; that this is distributable, but not free. - - -(defn evaluate [f] ((f (lambda [x] (+ x 1))) 0)) - -(defn successor [n] (lambda [f] (lambda [x] (f ((n f) x))))) -(defn plus [m n] ((n successor) m)) -(defn exponent [m n] (n m)) -(defn zero [f] (lambda [x] x)) -(defn one [f] (lambda [x] (f x))) - -(defn predecessor [n] (lambda [f] (lambda [x] - (((n (lambda [g] (lambda [h] (h (g f))))) (lambda [y] x)) (lambda [z] z))))) - -(defn subtract [m n] ((m predecessor) n)) - -(setv two (plus one one)) -(setv three (plus two one)) - -(print (evaluate (exponent three three)))