[plt-scheme] why does input port close?
On Nov 19, David B. Tucker wrote:
> (define b (call-with-input-file "/home/dbtucker/A.hs" input-port->line-stream))
> (b)
>
> The call to (a) succeeds, but the call to (b) gives this error:
>
> read-char: input port is closed
Just look at the documentation for it -- "If proc returns, then the
port is closed automatically and the value(s) yielded by the proc
is(are) returned".
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!