#lang planet dyoo/whalesong (require (planet dyoo/whalesong/web-world) (planet dyoo/whalesong/resource)) (define-resource view1.html) (define-resource view2.html) ;; draw: world view -> view (define (draw w v) (cond [(= (modulo w 2) 0) view1.html] [else view2.html])) ;; tick: world view -> world (define (tick w v) (+ w 1)) (printf "Before the big bang\n") (big-bang 0 (initial-view view1.html) (to-draw draw) (on-tick tick 1) (stop-when (lambda (w v) (> w 10)))) (printf "After the big bang\n")