From: Edgar Friendly <thelema314@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Binary logarithm of a power of 2
Date: Sat, 28 May 2011 12:04:24 -0400 [thread overview]
Message-ID: <4DE11D08.1080102@gmail.com> (raw)
In-Reply-To: <20110528155839.GA9002@annexia.org>
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
On 05/28/2011 11:58 AM, Richard W.M. Jones wrote:
> It's long been on my OCaml wishlist (along with a 'return' statement)
> to be able to use inline asm.
Inline asm might not be here, but there's two similar implementations of
'return', one in Batteries and one in Jane Street Core.
http://ocaml.janestreet.com/?q=node/91
http://ocaml-batteries-team.github.com/batteries-included/hdoc/BatReturn.html
Example (using BatReturn):
| open Return
let find_in_array a e =
label (fun label ->
for i = 0 to Array.length a - 1 do
if Array.get a i = e then return label (Some i)
done;
None)|
Sharing this in case anyone didn't know about these.
E.
[-- Attachment #2: Type: text/html, Size: 1339 bytes --]
next prev parent reply other threads:[~2011-05-28 16:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-26 15:51 [Caml-list] " Dario Teixeira
2011-05-26 19:28 ` Goswin von Brederlow
2011-05-27 11:50 ` Dario Teixeira
2011-05-27 13:26 ` [Caml-list] " Sylvain Le Gall
2011-05-27 17:15 ` Xavier Leroy
2011-05-27 18:04 ` Dario Teixeira
2011-05-27 18:37 ` Till Varoquaux
2011-05-27 18:46 ` Till Varoquaux
2011-05-28 0:28 ` Harrison, John R
2011-05-28 15:58 ` Richard W.M. Jones
2011-05-28 16:04 ` Edgar Friendly [this message]
2011-05-28 17:50 ` Matteo Frigo
[not found] ` <BANLkTimtMZvoBKHznBYH91czci=YdiRcog@mail.gmail.com>
2011-05-28 21:13 ` Fwd: " Johannes
2011-05-30 11:48 ` Jean-Christophe Filliâtre
2011-05-27 17:21 Dario Teixeira
2011-05-28 5:29 ` Gabriel Kerneis
2011-05-28 16:17 ` Norman Hardy
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=4DE11D08.1080102@gmail.com \
--to=thelema314@gmail.com \
--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