From 49f79c965379360644f3a0f2aa4bbb6cbd7d50dc Mon Sep 17 00:00:00 2001 From: Juergen Hoetzel Date: Sun, 15 Mar 2015 19:30:43 +0100 Subject: [PATCH] no need for intermediate function --- code/async/main.topscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/async/main.topscript b/code/async/main.topscript index 6484c8c..860f381 100644 --- a/code/async/main.topscript +++ b/code/async/main.topscript @@ -154,7 +154,7 @@ handle_error ();; handle_error ();; #part 33 let handle_error () = - try_with (fun () -> maybe_raise ()) + try_with maybe_raise >>| function | Ok () -> "success" | Error _ -> "failure"