From 73e9e778302f7b8f6e62b16cf9ff6741e81f6e59 Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Mon, 14 Sep 2009 00:59:45 +0000 Subject: [PATCH] run-simulation -> animate svn: r15995 --- collects/teachpack/2htdp/scribblings/universe.scrbl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/collects/teachpack/2htdp/scribblings/universe.scrbl b/collects/teachpack/2htdp/scribblings/universe.scrbl index e49bea6260..881a173a4c 100644 --- a/collects/teachpack/2htdp/scribblings/universe.scrbl +++ b/collects/teachpack/2htdp/scribblings/universe.scrbl @@ -89,7 +89,7 @@ The simplest kind of animated @tech{world} program is a time-based supply a function that creates a scene for each natural number. By handing this function to the teachpack displays the simulation. -@defproc[(run-simulation [create-image (-> natural-number/c scene)]) +@defproc[(animate [create-image (-> natural-number/c scene)]) true]{ opens a canvas and starts a clock that tick 28 times per second. Every @@ -97,7 +97,7 @@ The simplest kind of animated @tech{world} program is a time-based number of ticks passed since this function call. The results of these function calls are displayed in the canvas. The simulation runs until you click the @tt{Stop} button in DrScheme or close the window. At that - point, @scheme[run-simulation] returns the number of ticks that have + point, @scheme[animate] returns the number of ticks that have passed. } @@ -110,9 +110,15 @@ Example: (overlay (circle 10 'solid 'green) (rectangle 40 4 'solid 'green))) -(run-simulation create-UFO-scene) +(animate create-UFO-scene) ] +@defproc[(run-simulation [create-image (-> natural-number/c scene)]) + true]{ + + @scheme[animate] was originally called @scheme[run-simulation], and this + binding is retained for backwards compatibility} + @;----------------------------------------------------------------------------- @section[#:tag "interactive"]{Interactions}