I'm supposed to use Scheme, with the Dr. Racket program, to remove duplicates from a list.
I have the list (a b a a a a c c c) and I need to get the result (a b a c).
The code I have so far gives me (a b a)
(define (removeduplicate lst)
((null? lst) '())
((null? (cdr lst)) '())
((equal? (car lst)(car(cdr lst)))
(else (cons(car lst)(removeduplicate(cdr lst))))