caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian Sternagel <Christian.Sternagel@uibk.ac.at>
To: caml-list@yquem.inria.fr
Subject: camlp4
Date: Fri, 18 Jan 2008 18:08:52 +0100	[thread overview]
Message-ID: <1200676132.4790dd24bfca9@web-mail2.uibk.ac.at> (raw)

When using `camlp4o -parser Camlp4ListComprehension' as preprocessor,
is the resulting code the naive translation, like in,

 [(x, y) | x <- xs, even xs, y <- ys]

=>

 List.flatten (
  List.map (fun x -> List.map (fun y -> (x, y)) ys) (List.filter even xs)
 )

or is there an optimization in order to avoid appends and minimize the
number of cons?

cheers

christian


             reply	other threads:[~2008-01-18 17:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18 17:08 Christian Sternagel [this message]
2008-01-18 18:56 ` [Caml-list] camlp4 Nicolas Pouillard
2008-01-18 19:30 ` Olivier Andrieu
2008-01-18 19:53   ` Nicolas Pouillard
2008-01-19 15:09     ` Christian Sternagel
2008-01-20 15:23       ` Nicolas Pouillard
2008-01-22 13:33         ` Christian Sternagel
2008-01-22 13:42           ` Nicolas Pouillard
2008-01-22 14:06             ` Loup Vaillant
2008-01-22 14:26               ` Nicolas Pouillard
2008-01-22 16:43             ` Christian Sternagel
2008-01-22 18:20               ` Nicolas Pouillard
2008-01-24  9:01                 ` Christian Sternagel
  -- strict thread matches above, loose matches on Subject: below --
2010-02-06  1:16 camlp4 Andy Ray
2010-02-06 13:37 ` [Caml-list] camlp4 Ed Keith
2010-02-06 16:25   ` camlp4 Chris Conway
1997-01-14 12:47 camlp4 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=1200676132.4790dd24bfca9@web-mail2.uibk.ac.at \
    --to=christian.sternagel@uibk.ac.at \
    --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;
as well as URLs for NNTP newsgroup(s).