Skip to content

Instantly share code, notes, and snippets.

@markrendle
Created July 8, 2010 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markrendle/468688 to your computer and use it in GitHub Desktop.
Save markrendle/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