In this paper we present a model of interactive programs in a purely\ud functional style. We exploit lazy evaluation in the modelling of streams\ud as lazy lists. We show how programs may be constructed in an ad hoc\ud way, and then present a small set of interactions and combinators which\ud form the basis for a disciplined approach to writing such programs.\ud One of the difficulties of the ad hoc approach is that the way in which\ud input and output are interleaved by the functions can be unpredictable.\ud In the second half of the paper we use traces, i.e. partial histories of\ud behaviour, to explain the interleaving of input and output, and give a\ud formal explanation of our combinators. We argue that this justifies our\ud claim that the combinators have the intuitively expected behaviour, and\ud finally contrast our approach with another
To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.