The language used here is in Racket. Please explain what is the code doing and the meaning of each line.
(define intersect(lambda (set1 set2)(cond((null? set1)(quote ()))((member (car set1) set2)(cons (car set1)(intersect (cdr set1) set2)))(else (intersect (cdr set1) set2)))))
(intersect '(1 2 3) '(3 2 1))(intersect '(1 2 3) '(4 5 6))(intersect '(1 2 3) '(2 3 4 5 6))
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here