It is in scheme!
Q6: Remove
Implement a procedure remove that takes in a list and returns anew list with all instances of item removed from lst. Youmay assume the list will only consist of numbers and will not havenested lists.
Hint: You might find the filter procedure useful.
(define (remove item lst) ‘YOUR-CODE-HERE ) ;;; Tests (remove 3 nil) ; expect () (remove 3 ‘(1 3 5)) ; expect (1 5) (remove 5 ‘(5 3 5 5 1 4 5 4)) ; expect (3 1 4 4) |
Expert Answer
Answer to It is in scheme! Q6: Remove Implement a procedure remove that takes in a list and returns a new list with all instances …