to-draw and on-draw check

This commit is contained in:
Matthias Felleisen 2010-10-08 16:17:03 -04:00
parent 96bf9d2518
commit 995ce61434

View File

@ -0,0 +1,13 @@
#lang scheme
(require 2htdp/universe)
(define s "")
(define x 0)
(with-handlers ((exn? (lambda _ "success!")))
(big-bang 0
(on-tick (lambda (w) (begin (set! x (+ x 1)) w)))
(to-draw (lambda (w) (set! s (number->string w))))
(on-draw (lambda (w) (set! s (number->string w))))))