caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Brian Hurt <bhurt@janestcapital.com>
To: Jeremy Yallop <jeremy.yallop@ed.ac.uk>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] ANN: pattern guards
Date: Fri, 29 Jun 2007 15:31:19 -0400	[thread overview]
Message-ID: <46855E07.5030701@janestcapital.com> (raw)
In-Reply-To: <468555F9.7090005@ed.ac.uk>

Jeremy Yallop wrote:

>
> Unless I'm mistaken you can write this as
>
>     match x with
>     | Y (y as z)
>     | X (y,z)    -> f y z
>
> Is there some more general case for which this won't work out?
>

I often times want to be able to write code like:
    match foo with
    | Y (y) with x = 3
    | X(x, y) ->
       f x y

Brian


  reply	other threads:[~2007-06-29 19:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29 14:19 Jeremy Yallop
2007-06-29 18:26 ` [Caml-list] " skaller
2007-06-29 18:56   ` Jeremy Yallop
2007-06-29 19:31     ` Brian Hurt [this message]
2007-06-30  4:09     ` skaller
2007-06-30  4:44       ` Arnaud Spiwack
2007-07-03  9:29         ` Jeremy Yallop

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=46855E07.5030701@janestcapital.com \
    --to=bhurt@janestcapital.com \
    --cc=caml-list@inria.fr \
    --cc=jeremy.yallop@ed.ac.uk \
    /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).