[plt-scheme] peek/read in PLT Scheme

From: Arjun Guha (guhaarju at grinnell.edu)
Date: Mon May 9 17:37:54 EDT 2005

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
>



Posted on the users mailing list.