[racket] How to read procedure documentation?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Apr 19 18:31:46 EDT 2013

Technically, paths are path-string?.

Robby


On Fri, Apr 19, 2013 at 1:57 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:

> On 2013-04-19 20:18:53 +0200, Manfred Lotz wrote:
> >   path : path-string?
> >
> > [...]
> >
> > I would expect that the first parameter path is a string and that the
> > second parameter is an optional parameter denoting a file mode. Further
> > I would assume that file->string returns a string containing the whole
> > file.
> >
> > From this I'm wondering why there are predicates when for example I
> > would expect strings?
>
> Is the question about the `path` argument in particular? The
> documentation here is just saying `path` should be any value that can
> pass the `path-string?` predicate, which is a subset of the values that
> pass `string?`.
>
> So for example "\0" is an invalid argument because
>   -> (path-string? "\0")
>   #f
>
> but "/tmp" is fine because
>   -> (path-string? "/tmp")
>   #t
>
> The documentation of `path-string?` has more details.
>
> Cheers,
> Asumu
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130419/659ca6b3/attachment.html>

Posted on the users mailing list.