Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Different types of streams
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-08-28 (08:20)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Different types of streams

On Mon, Aug 27, 2001 at 07:47:36PM +0200, Nicolas George wrote:

> I was thinking to streams not used as input for a parser, but as generic
> data channel: a dumb sequence of values passed from one function to
> another. Like some sort of list, but with fast concatenation and optionnal
> lazy evaluation.

In this case, if you don't use parsers, it is not necessary to use the
streams of the Stream library. Why not define your own streams?

   type 'a stream =
    | Cons of 'a Lazy.t * 'a stream Lazy.t
    | App of 'a stream Lazy.t * 'a stream Lazy.t

Bug reports:  FAQ:
To unsubscribe, mail  Archives: