Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. let drawrect area =
  2. let rec loop1 m =
  3. match m with
  4. | m when m < 5 ->
  5. (let rec loop x y n =
  6. match n with
  7. | n when n < 5 ->
  8. let x = x + 5 in
  9. let y = y + 5 in
  10. let width = 10 in
  11. let height = 10 in
  12. let update_rect = Gdk.Rectangle.create ~x ~y ~width ~height in
  13. area#misc#draw (Some update_rect);
  14. loop x y (n + 1)
  15. | n when n >= 5 -> loop1 (m + 1)
  16. in loop 0 0 0)
  17. | m when m >= 5 -> loop1 0
  18. in loop1 0
  19. ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement