[plt-scheme] Htdp chapter 12 insertion sort

From: aditya shukla (adityashukla1983 at gmail.com)
Date: Tue Jun 2 01:54:57 EDT 2009

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)
    [(empty? alon) empty]
    [(cons? alon) (insert (first alon) (sort (rest alon)))]))- what is
cons? alon here , is it required there?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090602/2e8ef0a2/attachment.html>

Posted on the users mailing list.