Question: Write the following using scheme. Please do not use built in Scheme functions except: car, cdr (and all their variants), cons, null?, pair?, list?, =,
Write the following using scheme. Please do not use built in Scheme functions except: car, cdr (and all their variants), cons, null?, pair?, list?, =, eq?, equal?, zero?, if, cond, list, and all the standard arithmetic and logic functions.
removedups** takes a list, that can contain sublists, and removes any element that, once repeated elements have been removed from it, is the repeat of any element (also once elements have been removed from it) that immediately precedes it in the same sublist
Example Input and Output:
> (removedups** '(x x (a a b) (a b b) c c)) (x (a b) c) > (removedups** '((a a (b b b (c))) (a (b (c c)) (b b b (c))))) ((a (b (c))))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
