CSC 160 Examples

Summer I, 2005

Examples 1-10 require loading the world.ss teachpack.

example1.scm
A blue ball that does nothing.
example2.scm
A blue ball that gets 1 pixel bigger each second.
example3.scm
A text string that gets an additional letter each second.
example4.scm
A digital counter that increases by one each half second.
example5.scm
A blue ball that gets 1 pixel bigger each half second, up to a limit, at which point the animation ends.
example6.scm
A blue ball that moves left or right if you press the left or right arrow key on the keyboard.
example7.scm
A blue ball that moves left, right, up, or down when you press the corresponding arrow key on the keyboard. Uses posn
example8.scm
The same, but re-structured with auxiliary functions.
example9.scm
The same, but switching colors between red and green every second. Uses a user-defined structure
example10.scm
The same, with a slightly different definition of the user-defined structure.
animations.tar
Examples 1-10 in a single downloadable file
stutter-template.scm
The first stage of the stutter function; your job is to pick an example, annotate it with values for that example, and finish the definition.
remove-over-100-template.scm
The first stage of the remove-over-100 function; your job is to pick an example, annotate it with values for that example, and finish the definition.
day16.scm
Some examples of higher-order functions: remove-if and do-to-each.

You are visitor number to this and related pages since June 4, 2001.
Last modified:
Stephen Bloch / sbloch@adelphi.edu