Skip to content

Instantly share code, notes, and snippets.

@lowellbander
Created October 21, 2015 00:40
Show Gist options
  • Save lowellbander/a948cc6e1d6ed50dd165 to your computer and use it in GitHub Desktop.
Save lowellbander/a948cc6e1d6ed50dd165 to your computer and use it in GitHub Desktop.
(defun goal-test (s)
(cond
((null s) t) ; an empty map doesn't have boxes on non-goal squares
((has box (first s)) nil)
(t (goal-test (rest s)))
)
);end defun
(defun has (item items)
(cond
((null items) nil)
((equal item (first items)) t)
(t (has item (rest items)))
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment