Because the already-sorted case is apparently common on some platforms, <br>if you ever expect to have long directory lists, use mergesort instead.<br><br>Keith F.<br><br><div><span class="gmail_quote">On 9/13/06, <b class="gmail_sendername">
Matthias Felleisen</b> <<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Just sort it. -- Matthias<br><br> (require (lib "list.ss"))<br><br> (define (read-directory)<br> (define (path< p q)<br> (< (file-or-directory-modify-seconds (path->string p))<br> (file-or-directory-modify-seconds (path->string q))))
<br> (quicksort (directory-list) path<))<br><br>I know. We could use shorter names.<br><br></blockquote></div><br>