Skip to content

Instantly share code, notes, and snippets.

@keigoi
Created July 6, 2015 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keigoi/3fa06f9c53bcbe6d9f9c to your computer and use it in GitHub Desktop.
Save keigoi/3fa06f9c53bcbe6d9f9c to your computer and use it in GitHub Desktop.
(* try at http://try.ocamlpro.com/js_of_ocaml/ *)
open Graphics
let () = open_graph " 900x600"
let rec k c =
clear_graph ();
moveto 450 300;
draw_string (string_of_int c);
ignore (Dom_html.window##setTimeout(Js.wrap_callback (fun _ -> k (c+1)), 0.1))
let () = k 0 ;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment