Check if two Lists are Equal using Scheme Source Code
The following code checks if two lists are equal
(define equal(lambda (x y)
(cond((and(null? x) (null? y)) #t)
((and(not (null? x)) (not (null? y))) (equal (cdr x) (cdr y)))
(else #f))))
Related Articles
- Append Two Lists Using Scheme Source Code
- Cartesian Product Using Scheme Source Code
- Copy List Using Scheme Source Code
- Cube Function Using Scheme Source Code
- Delete all Occurrences of an Element from a List Using Scheme Source Code
- Delete the Third Occurrence of an Element from a List Using Scheme Source Code
- Delete the Nth Occurrence of an Element from a List with Set! Using Scheme Source Code
- Delete the Nth Occurrence of an Element from a List without Set! Using Scheme Source Code
