Created
July 6, 2015 23:03
-
-
Save keigoi/3fa06f9c53bcbe6d9f9c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* 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