[plt-scheme] Htdp chapter 12 insertion sort
I have a question about the insertion sort algorithm implemented in chapter
12.The figure 33 explains
;; sort : list-of-numbers -> list-of-numbers (sorted)
;; to create a list of numbers with the same numbers as
;; alon sorted in descending order
(define (sort alon)
(cond
[(empty? alon) empty]
[(cons? alon) (insert (first alon) (sort (rest alon)))]))- what is
cons? alon here , is it required there?
Thanks
Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090602/2e8ef0a2/attachment.html>