title: Removing the minimum elements of a list in Scheme
body: <p>Is there any convenient way to remove the minimum element? I can only think of one way, finding the minimum and then removing it. But that seems to be inefficient.</p>
  
  <pre><code>(define (min set)
      (let ((x (car set))
            (rest (cdr set)))
        (if (null? rest)
            x
            (if (&lt; x (min rest))
                x
                (min rest)))))
  
  (define (remove x set)
    (let ((s (car set)))
      (if (= x s)
          (cdr set)
          (cons s (remove x (cdr set))))))
  
  (define (remove-min set)
      (remove (min set) set))
  (remove-min `(4 1 4 5))
  </code></pre>