[racket] fold/null-list? in srfi/1
Li-Ta Lo <lita.ollie at gmail.com> writes:
> Thanks.
>
> What does "%3a1" mean?
>
Short answer: its the percent-encoded form of ":1".
Long answer:
The SRFI library names for R6RS have been standardized in SRF-97[0] to
look like this: (srfi :<N> [<NAME>]). In Racket's R6RS mode, you could
just:
(import (srfi :1))
or, alternatively, being a bit more descriptive:
(import (srfi :1 lists))
However, from R5RS code, or plain Racket, `import' is not available, and
hence one must use the `require' form, which essentially does a
filename-based lookup, while R6RS's `import' (in its Racket
implementation) does percent-encode several characters if they occur in
parts of the library name, mostly to cater for filesystems that have
stupid restrictions (such as NTFS; it should be noted however, that even
on Unix would have trouble with a slash occuring in a library name
component). The double-colon is one of those characters, thus the R6RS
library name `(srfi :1)' ends up being mapped to the relative path
"srfi/%3a1.rkt".
For percent-encoding, see
<http://en.wikipedia.org/wiki/Percent-encoding>.
For an amusing account of the ridiculous restrictions of NTFS (or rather
the Windows API layered above it), see
<http://heirloom.sourceforge.net/mailx_aux_c.html>.
[0] http://srfi.schemers.org/srfi-97/srfi-97.html
Cheers, Rotty
--
Andreas Rottmann -- <http://rotty.yi.org/>