Mon, 25 Sep 2000 17:17:15 +0200 (METDST), Jose Emilio Labra Gayo
<[EMAIL PROTECTED]> pisze:
> > prg :: String -> String
> > prg =
> > {- for example -} \(c:cs) -> "first char = " ++ [c]
It provides no way to tell how much of input it really used, and how
much it threw away.
> Is it possible to run an 'interact'ive program more than once?
No, unless you know from other sources where to split input for use
by the second subprogram.
Well, it could be done in an extermely tricky and non-portable way
(in a compiler that provides unsafePerformIO) by detecting how much
of the input list was evaluated by the first program. But pure Haskell
cannot detect if a value is already evaluated or not.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK