Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] OCaml wishlist
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-21 (20:53)
From: Yaron Minsky <yminsky@c...>
Subject: Re: [Caml-list] OCaml wishlist
This seems pretty easy to achieve, although it's a bit messy.  Seems like
you might be able to clean it up with camlp4.  Here's the basic idea:

exception Return

let f ... =
  let rval = ref None in
      rval := Some ...;
      raise Return
      Return ->
	match rval with
	    None -> "Bug! function ended without returning"
	  | Some x -> x

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: