# [plt-scheme] Combining two definition into one only

SamuelXiao wrote:
>* I am a scheme newbie, could anyone tell me how can i combine this
*>* following 2 definition into one?
*>* -----------------------------------------------------------------------------------------------------------------------------
*>*
*(define insertion-sort-numbers
(lambda (numbers)
(define insert-number
(lambda (new-element sorted)
(cond ((null? sorted) (list new-element))
((<= new-element (car sorted)) (cons new-element sorted))
(else (cons (car sorted) (insert-number new-element (cdr sorted)))))))
(let helper ((unsorted numbers) ; The remaining unsorted values
(sorted '())) ; The sorted values
(if (null? unsorted)
sorted
(helper (cdr unsorted) (insert-number (car unsorted) sorted))))))