DEFINE((
        (MIN(LAMBDA (X Y) (COND
	((NULL Y) X)
        ((LESSP X Y) X)
        (T Y))))

        (SMALLEST (LAMBDA (X) (COND
        ((NULL X) NIL)
        (T (MIN (CAR X) (SMALLEST (CDR X)))))))

        (DELETE (LAMBDA (X Y) (COND
        ((NULL X) NIL)
        ((EQ (CAR X) Y) (CDR X))
        (T (CONS (CAR X) (DELETE (CDR X) Y))))))

        (SORT (LAMBDA (X) (COND
        ((NULL X) NIL)
        (T (COMB X (SMALLEST X))))))

        (COMB (LAMBDA (X Y)
        (CONS Y (SORT (DELETE X Y)))))  ))

SORT ((10 9 8 3 7 5 6 1 2 4 ))
ICLOSE NIL
