caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nathaniel Gray" <n8gray@gmail.com>
To: skaller <skaller@users.sourceforge.net>
Cc: "Jon Harrop" <jon@ffconsultancy.com>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] List comprehensions
Date: Mon, 20 Aug 2007 15:55:45 -0700	[thread overview]
Message-ID: <aee06c9e0708201555v4df486cag4af37972205b982b@mail.gmail.com> (raw)
In-Reply-To: <1187448871.10363.69.camel@rosella.wigram>

On 8/18/07, skaller <skaller@users.sourceforge.net> wrote:
> On Sat, 2007-08-18 at 15:28 +0100, Jon Harrop wrote:
> > I didn't know OCaml had list comprehensions built-in:
> >
> > $ ocaml camlp4oof.cma
> >         Objective Caml version 3.10.0
> >
> >         Camlp4 Parsing version 3.10.0
> >
> > # [x + 2*x + x/2 | x <- [1; 2; 3; 4]];;
> > - : int list = [3; 7; 10; 14]
> > #
> >
> > Cool! :-)
>
> Since you're fishing, I'm biting -- what bait do you
> need to catch a camlp4oof?

I guess just 0.3.10.

[n8gray@golux]% locate camlp4oof
/usr/local/godi/bin/camlp4oof
/usr/local/godi/bin/camlp4oof.opt
/usr/local/godi/lib/ocaml/std-lib/camlp4/camlp4oof.cma

[n8gray@golux]% rlwrap ocaml camlp4oof.cma
        Objective Caml version 3.10.0

        Camlp4 Parsing version 3.10.0

# [x + 2*x + x/2 | x <- [1; 2; 3; 4]];;
- : int list = [3; 7; 10; 14]
# [x + 2*x + x/2 - y | x,y <- [1,2; 2,3; 3,4; 4,5]];;
- : int list = [1; 4; 6; 9]

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->


  reply	other threads:[~2007-08-20 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-18 14:28 Jon Harrop
2007-08-18 14:44 ` [Caml-list] " Joel Reymont
2007-08-18 14:46   ` Jon Harrop
2007-08-19 10:26   ` Nicolas Pouillard
2007-08-18 14:54 ` skaller
2007-08-20 22:55   ` Nathaniel Gray [this message]
2007-08-22  8:54     ` Adrien

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=aee06c9e0708201555v4df486cag4af37972205b982b@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    --cc=skaller@users.sourceforge.net \
    /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).