Skip to content

Instantly share code, notes, and snippets.

@yao2030
Created December 17, 2012 03:12
Show Gist options
  • Save yao2030/4315560 to your computer and use it in GitHub Desktop.
Save yao2030/4315560 to your computer and use it in GitHub Desktop.
(define (equal? list1 list2)
(cond ((null? list1) (null? list2))
((null? list2) #f)
((eq? list1 list2) #t)
((eq? (car list1) (car list2)) (equal? (cdr list1) (cdr list2)))
(else #f)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment