[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Artem Prisyznuk <tema@s...> |
| Subject: | Re: [Caml-list] polymorphism and try |
On Tue, 14 Oct 2003 15:17:12 +0200, Guillaume Châtelet <guillaume.chatelet@rd.francetelecom.com> wrote: > # let my_try f = try f with e -> raise e ;; This exception never raised, because you not call function f, but only return it as result of my_try. For your purpose possible next code: let my_try f = try f () with e -> raise e;; let id = fun x -> x;; let my_id a = my_try (fun () -> id a);; let my_array_get a b c = my_try (fun () -> Array.get a b c));; -- Artem Prysyznuk tema@sit.kiev.ua ------------------- 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