Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Francois Pottier <francois.pottier@inria.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Re: Lexicographic sort
Date: Thu, 30 Jan 2003 11:02:53 +0100	[thread overview]
Message-ID: <20030130110253.A20483@pauillac.inria.fr> (raw)
In-Reply-To: <20030130110049.A19993@pauillac.inria.fr>; from francois.pottier@inria.fr on Thu, Jan 30, 2003 at 11:00:49AM +0100

On Thu, Jan 30, 2003 at 11:00:49AM +0100, Francois Pottier wrote:
> 
> For instance, here is code that sorts integer triples:
> 
>   let compare (major1, middle1, minor1) (major2, middle2, minor2) =
>     match major1 - major2, middle1 - middle2, minor1 - minor2 with
>     | 0, 0, d
>     | 0, d, _
>     | d, _, _ ->
> 	d

Of course, I should have said: here is code that *compares*
integer triples.

-- 
François Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-01-31  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-30 10:00 [Caml-list] " Francois Pottier
2003-01-30 10:02 ` Francois Pottier [this message]
2003-01-31 10:33 ` Laurent Vibert
2003-01-31 12:25   ` Luc Maranget

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=20030130110253.A20483@pauillac.inria.fr \
    --to=francois.pottier@inria.fr \
    --cc=caml-list@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