Browse thread
lazy lists
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Loup Vaillant <loup.vaillant@g...> |
| Subject: | Re: [Caml-list] lazy lists |
2007/5/2, Nicolas Pouillard <nicolas.pouillard@gmail.com>: > On 5/1/07, Jon Harrop <jon@ffconsultancy.com> wrote: > > On Tuesday 01 May 2007 16:47, Loup Vaillant wrote: > > > The equivalent is the functionnal streams, describe briefly in the > > > camlp4 manual. > > > > Aren't ocaml stream destructive? > > Yes they are. Regular streams are destructive. I was talking about "functional" ones. I didn't try them myself, but the manual says one can perform left recursion with them (thanks to their non destructive nature). Mind the pattern matching, though: it is quite different from the one used with regular streams. the syntax looks like: let f s = match s with fparser (* and not just 'parser' *) ... If I remember well. Loup Vaillant