Advertisement
Guest User

Untitled

a guest
Apr 10th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.29 KB | None | 0 0
  1.   let make_module dice_results : (Tellstory.T) =
  2.     let dice_calls = ref 0 in (* nr of times dice has been called *)
  3.     Tellstory.Make(struct
  4.       let dice n =
  5.         let result = List.nth dice_results (!dice_calls) in
  6.         dice_calls := !dice_calls + 1;
  7.         result
  8.     end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement