how to delete an element from a list ex:- list=[1 2 3 4]
I have come up with some code.I think I got wrong somewhere.
(define delete item
(lambda (list)
(cond
((equal?item (car list)) cdr list)
(cons(car list)(delete item (cdr list))))))