From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Generators/iterators and lazy evaluation?
Date: Thu, 5 Apr 2007 21:35:32 +0100 [thread overview]
Message-ID: <200704052135.32683.jon@ffconsultancy.com> (raw)
In-Reply-To: <46149010.30505@inria.fr>
On Thursday 05 April 2007 06:58, Alain Frisch wrote:
> Jon Harrop wrote:
> > The moral is: don't try to write idiomatic Python in OCaml.
>
> I think the moral is rather: read the OP's email more carefully. He
> doesn't want to translate some Python examples into OCaml by hand, he
> wants to implement a Python interpreter in OCaml.
My mistake. In that case, I agree that CPS is the obvious solution. Perhaps it
is possible to do something equivalent by explicitly storing the state
and "program counter" in the function when yield is called?
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
prev parent reply other threads:[~2007-04-05 20:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 16:33 Raj B
2007-04-04 20:10 ` [Caml-list] " Mathias Kende
2007-04-04 20:46 ` Alain Frisch
2007-04-04 21:16 ` Erik de Castro Lopo
2007-04-04 21:37 ` Erik de Castro Lopo
2007-04-04 22:55 ` Bill Wood
2007-04-05 2:49 ` skaller
2007-04-05 16:41 ` Richard Jones
2007-04-04 23:53 ` Jon Harrop
2007-04-05 3:13 ` Erik de Castro Lopo
2007-04-05 5:58 ` Alain Frisch
2007-04-05 20:35 ` Jon Harrop [this message]
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=200704052135.32683.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