caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Lloyd Moore" <lloyd@encantado.net>
To: <caml-list@yquem.inria.fr>
Subject: The kth element
Date: Mon, 15 Jan 2007 22:52:06 +0100	[thread overview]
Message-ID: <015f01c738ef$66bc63b0$6401a8c0@lloyd> (raw)

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

If I understood the question correctly posed by Dr Jon Harrop...

 let smallest lst = let rec sml lst v =
 match lst with
   [] -> v
 | h::t ->
     match t with
         h::t -> if h < (List.hd t) then sml t h else sml t v
     | _ -> v
  in sml lst (List.hd lst) ;;

[-- Attachment #2: Type: text/html, Size: 838 bytes --]

             reply	other threads:[~2007-01-15 21:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-15 21:52 Lloyd Moore [this message]
2007-01-15 22:25 ` [Caml-list] " Jonathan Bryant

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='015f01c738ef$66bc63b0$6401a8c0@lloyd' \
    --to=lloyd@encantado.net \
    --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).