|(require graphics/value-turtles)||package: htdp-lib|
The value turtles are a variation on traditional turtles. Rather than having just a single window where each operation changes the state of that window, in the graphics/value-turtles library, the entire turtles window is treated as a value. This means that each of the primitive operations accepts, in addition to the usual arguments, a turtles-window value; instead of returning nothing, each returns a turtles-window value.
Instead, the merge accepts two turtles windows and combines the state of the two turtles windows into a single window. The new window contains all of the turtles of the previous two windows, but only the line drawings of the first turtles argument.
The graphics/turtle-examples library’s source is meant to be read, but it also exports the following examples.
(regular-poly sides radius turtles) → turtles?
sides : exact-nonnegative-integer? radius : real? turtles : turtles?
(regular-polys n s turtles) → turtles?
n : exact-nonnegative-integer? s : any/c turtles : turtles?