[plt-scheme] peek/read in PLT Scheme
Thanks, that helps.
-Arjun
On May 9, 2005, at 16:19 , Matthew Flatt wrote:
> At Mon, 9 May 2005 16:07:19 -0500, Arjun Guha wrote:
> > Is there a procedure in PLT Scheme that reads Scheme expressions
> from
> > an input port, but does not move ahead to the next expression
> (i.e. a
> > peek operation)?
>
> No, but as of v299.103 or so, you can use `peeked-input-port' from
> `(lib "port.ss")' and pass the result to `read'.
>
> `peeked-input-port' takes an input port and produces a port whose read
> operations correspond to peeking on the original port.
>
> Matthew
>