(define remove (lambda (val lst . prc) (let ((proc (if (procedure? prc) prc equal?))) (foldr (lambda (x acc) (if (apply proc (list val x)) acc (cons x acc))) (list) lst))))