Skip to content

Instantly share code, notes, and snippets.

@matthew-ball
Created June 7, 2014 15:56
Show Gist options
  • Save matthew-ball/3e7eb65f569fde024b7d to your computer and use it in GitHub Desktop.
Save matthew-ball/3e7eb65f569fde024b7d to your computer and use it in GitHub Desktop.
(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