(Solved) : Scheme Q6 Remove Implement Procedure Remove Takes List Returns New List Instances Item Rem Q42744389 . . .

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 …

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us