Created
June 7, 2014 15:56
-
-
Save matthew-ball/3e7eb65f569fde024b7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun to-laugh (tape) | |
(prog ((newtape tape)) | |
label_1 | |
(case (car newtape) | |
(h (setq newtape (cdr newtape)) (go label_2)) | |
(otherwise (return nil))) | |
label_2 | |
(case (car newtape) | |
(a (setq newtape (cdr newtape)) (go label_3)) | |
(otherwise (return nil))) | |
label_3 | |
(case (car newtape) | |
(! (setq newtape (cdr newtape)) (go label_4)) | |
(h (setq newtape (cdr newtape)) (go label_2)) | |
(otherwise (return nil))) | |
label_4 | |
(if (null newtape) | |
(return t) | |
(return nil)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment