Does anyone have/know of a lazy list module for ocaml? I couldn't
find anything on the hump.
Thanks!
Yitzhak
--------------------------------------------------
Yitzhak Mandelbaum
AT&T Labs - Research
http://www.research.att.com/~yitzhak
The equivalent is the functionnal streams, describe briefly in the
camlp4 manual.
Another possibilty is to code it yourself. I think you can imitate
most of the List module code.
Regards,
Loup
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
Aren't ocaml stream destructive?
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
The F#.NET Journal
http://www.ffconsultancy.com/products/fsharp_journal/?e
Yes they are.
--
Nicolas Pouillard
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
On Wed, May 02, 2007 at 12:03:29PM +0200, Loup Vaillant wrote:
> 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).
Use camlp4s : the library "fstream" and the syntax extension "pa_fstream"
are still there. Access and download from my home page below.
--
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/index-english.html