Skip to content

Instantly share code, notes, and snippets.

@jneira
Forked from gclaramunt/member-of-2.scm
Created December 13, 2010 18:37
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 jneira/739378 to your computer and use it in GitHub Desktop.
Save jneira/739378 to your computer and use it in GitHub Desktop.
(define (member-of-2? a lst1 lst2)
(if (or (null? lst1) (null? lst2)) #f
(or
(and (eq? a (car lst1))
(or (eq? a (car lst2))
(member-of-2? a (list a) (cdr lst2))))
(member-of-2? a (cdr lst1) lst2))))
@gclaramunt
Copy link

Eso!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment