"interact" behaves oddly if used interactively
Christian Maeder
maeder at tzi.de
Wed Oct 1 12:02:32 EDT 2003
I wrote:
>>"main=interact id" basically echoes every line of my input, whereas
>>"main=interact show" correctly waits for EOF before
>>outputting something.
The unix "cat" and "sort" behave in a similar way ("sort" obviuously has
to wait for the last line.)
Still I would regard it to be more "pure" (or "abstract") if my input
would always be mapped to visibly separate output.
Christian
More information about the Haskell
mailing list