From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Streams
Date: Fri, 11 Aug 2006 01:00:54 +0100 [thread overview]
Message-ID: <200608110100.54282.jon@ffconsultancy.com> (raw)
In-Reply-To: <5ebb1214.308e7ea.44db0fae.68763@o2.pl>
On Thursday 10 August 2006 11:51, Error404 wrote:
> I'm looking for some streams related tutorial or any other info.
> By stream i mean something like this (I don't know exact definition):
>
> open Lazy;;
> type 'a stream = Nil | Cons of 'a Lazy.t * 'a stream Lazy.t;;
>
> (* For example stream of 'integers from x' would look like this: *)
>
> let rec intsfrom x =
> Cons(lazy x,lazy (intsfrom (x+1)));;
>
> If you know any www/book or anything on this kind of streams please mail me
> (error92@tlen.pl). Many thanks.
I just posted a link to some stuff on streams in the context of parsing but
you can write intsfrom as:
# #load "camlp4o.cma";;
Camlp4 Parsing version 3.09.2
# let rec intsfrom n = [< 'n; intsfrom(n+1) >];;
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
next prev parent reply other threads:[~2006-08-11 0:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-10 10:51 Streams Error404
2006-08-10 11:40 ` [Caml-list] Streams Jonathan Roewen
2006-08-10 19:02 ` Chris King
2006-08-10 18:32 ` Martin Jambon
2006-08-11 0:00 ` Jon Harrop [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-07-05 23:05 [Caml-list] Re: generic programming Dave Berry
2002-08-02 14:49 ` [Caml-list] Streams Diego Olivier Fernandez Pons
2002-08-02 15:29 ` Alain Frisch
2002-08-03 14:19 ` Diego Olivier Fernandez Pons
[not found] <F241eHu7RVLCMUWktUq0000fbc1@hotmail.com>
2002-04-09 18:09 ` [Caml-list] Cannot find Stream Parser Documentation Wolfram Kahl
2002-04-10 11:03 ` [Caml-list] Streams Daniel de Rauglaudre
2002-04-11 14:35 ` Wolfram Kahl
2001-03-27 2:12 [Caml-list] Caml Development Kit Patrick M Doane
2001-03-27 3:15 ` Brian Rogoff
2001-03-27 6:48 ` [Caml-list] Streams Daniel de Rauglaudre
[not found] ` <3AC04E85.EE51D597@univ-savoie.fr>
2001-03-27 8:37 ` Daniel de Rauglaudre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200608110100.54282.jon@ffconsultancy.com \
--to=jon@ffconsultancy.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox