[plt-scheme] directory-list order?

From: Keith Frost (keith.l.frost at gmail.com)
Date: Wed Sep 13 12:27:50 EDT 2006

Because the already-sorted case is apparently common on some platforms,
if you ever expect to have long directory lists, use mergesort instead.

Keith F.

On 9/13/06, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> Just sort it. -- Matthias
>    (require (lib "list.ss"))
>    (define (read-directory)
>      (define (path< p q)
>        (< (file-or-directory-modify-seconds (path->string p))
>           (file-or-directory-modify-seconds (path->string q))))
>      (quicksort (directory-list) path<))
> I know. We could use shorter names.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060913/b66e3ce3/attachment.html>

Posted on the users mailing list.