- iset-delete-max! isetprocedure
Returns two values: the smallest/largest integer n in iset and a newly-allocated iset that contains all elements of iset except for n. It is an error if iset is empty.
The iset-delete-min! and iset-delete-max! procedures are the same as iset-delete-min and iset-delete-max, respectively, except that they are permitted to mutate and return the iset argument instead of allocating a new iset.
Examples:
(let-values (((n set) (iset-delete-min (iset 2 3 5 7 11)))) (list n (iset->list set))) ⇒ (2 (3 5 7 11))
(let-values (((n set) (iset-delete-max (iset 2 3 5 7 11)))) (list n (iset->list set))) ⇒ (11 (2 3 5 7))