Skip to content

Instantly share code, notes, and snippets.

@ThatRendle
Created July 8, 2010 21:44
Show Gist options
  • Save ThatRendle/468688 to your computer and use it in GitHub Desktop.
Save ThatRendle/468688 to your computer and use it in GitHub Desktop.
(define contains
(lambda (list item)
(and (not (null? list))
(or (= item (car list))
(contains (cdr list) item)))))
(define hasdup
(lambda (list)
(and (not (null? list))
(or (contains (cdr list) (car list))
(hasdup (cdr list))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment