remove-all   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

(define remove-all
   (lambda (obj lst)
      (cond ((null? lst)
       '())
      ((list? (car lst))
       (cons (remove-all obj (car lst))
       (remove-all obj (cdr lst))))
      ((equal? obj (car lst))
       (remove-all obj (cdr lst)))
      (else (cons (car lst) (remove-all obj (cdr lst)))))))


Back to Index