Last active
October 27, 2015 19:28
-
-
Save lowellbander/bc51319f0f318560328c 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 unique (items) | |
| (cond | |
| ((null items) t) | |
| ((contains (first items) (rest items)) nil) | |
| (t (unique (rest items))) | |
| ) | |
| ) | |
| (defun contains (needle haystack) | |
| (cond | |
| ((null haystack) nil) | |
| ((equal needle (first haystack)) t) | |
| (t (contains needle (rest haystack))) | |
| ) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment