Skip to content

Commit

Permalink
Added links in delimcc and reify_reflect examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
kayceesrk committed Sep 10, 2015
1 parent 5725e8b commit 29c3929
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion delimcc.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(* One-shot multi-prompt delimited control. *)
(* One-shot multi-prompt delimited control :
http://okmij.org/ftp/continuations/implementations.html *)

module type S = sig
type 'a prompt
Expand Down
9 changes: 6 additions & 3 deletions reify_reflect.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
(* Monadic Reflection :
http://www.cs.ioc.ee/mpc-amast06/msfp/filinski-slides.pdf *)

(* The monad signature *)
module type MONAD =
sig
Expand Down Expand Up @@ -83,17 +86,17 @@ let combined_example () =
put 100;
raise (Failure "An error!");
put 200

let print_exception e =
Printf.printf "Exception: %s\n" (Printexc.to_string e)

let () =
run_state ~init:10 state_example;
print_endline "========================================";

run_exception ~catch:print_exception exception_example;
print_endline "========================================";

begin
run_exception ~catch:print_exception @@ fun () ->
run_state ~init:10 @@ fun () ->
Expand Down

0 comments on commit 29c3929

Please sign in to comment.