[plt-scheme] peek/read in PLT Scheme

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon May 9 17:19:52 EDT 2005

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.