8 Jul
2005
8 Jul
'05
8:56 a.m.
Christian Maeder wrote:
Could you also insert a prompt that is shown before the lines are read? (The first prompt seems to be tricky assuming line buffering )
If line-buffering is assumed or imposed, of course it prevents the programming of interactive applications where the units of input or output are less than a line! However, there is no need to build line-buffering into the system, because it is easily defined in Haskell: buffer xs = foldl const xs xs lineBuffered = map buffer . lines Regards Colin R