supply missing documentation

This commit is contained in:
Matthias Felleisen 2011-05-13 12:32:28 -04:00
parent df05a41ebd
commit 02512706b1
18 changed files with 51 additions and 17 deletions

View File

@ -152,7 +152,8 @@
(provide-primitives
make-package ;; World Sexp -> Package
package? ;; Any -> Boolean
run-movie ;; [Listof Image] -> true
run-movie ;; [r Positive] [m [Listof Image]] -> true
;; run movie m at rate r images per second
mouse-event? ;; Any -> Boolean : MOUSE-EVTS
mouse=? ;; MOUSE-EVTS MOUSE-EVTS -> Boolean
key-event? ;; Any -> Boolean : KEY-EVTS

View File

@ -148,3 +148,10 @@ There is only one writer function at the moment:
(with-handlers ([exn:fail:filesystem? void])
(delete-file "output.txt")))
@section{Testing}
@defform[(simulate-file process str ...)]{
simulates a file system for the function @scheme[process], which reads a
file and may produce one. Note: this form is under development and will be
documented in a precise manner after it is finalized and useful for a wide
audience.}

View File

@ -25,7 +25,7 @@
@author{Matthias Felleisen}
@defmodule[#:require-form beginner-require 2htdp/universe #:use-sources (teachpack/htdp/image)]
@defmodule[#:require-form beginner-require 2htdp/universe #:use-sources (teachpack/2htdp/image)]
@;{FIXME: the following paragraph uses `defterm' instead of `deftech',
because the words "world" and "universe" are used as datatypes, and
@ -106,6 +106,13 @@ Example:
@scheme[animate] was originally called @scheme[run-simulation], and this
binding is retained for backwards compatibility}
@defproc[(run-movie [r (and/c real? positive?)] [m [Listof image?]])
true]{
@scheme[run-movie] displays the list of images @scheme[m] at the rate of
@scheme[r] images per second.}
@;-----------------------------------------------------------------------------
@section[#:tag "interactive"]{Interactions}

View File

@ -6,7 +6,7 @@
@teachpack["arrow-gui"]{An Arrow GUI}
@declare-exporting[teachpack/htdp/arrow-gui]
@defmodule[#:require-form beginner-require htdp/arrow-gui]
The teachpack provides operations for creating and manipulating an arrow
GUI. We recommend using the @seclink["world"]{world teachpack} instead.

View File

@ -6,7 +6,8 @@
@teachpack["arrow"]{Managing Control Arrows}
@declare-exporting[teachpack/htdp/arrow]
@;declare-exporting[teachpack/htdp/arrow]
@defmodule[#:require-form beginner-require htdp/arrow]
The teachpack implements a controller for moving shapes across a canvass. A
shape is a class of data for which @scheme[move] and @scheme[draw]

View File

@ -6,7 +6,8 @@
@teachpack["convert"]{Converting Temperatures}
@declare-exporting[teachpack/htdp/convert]
@;declare-exporting[teachpack/htdp/convert]
@defmodule[#:require-form beginner-require htdp/convert]
The teachpack @scheme[convert.ss] provides three functions for
converting Fahrenheit temperatures to Celsius. It is useful for a single

View File

@ -7,7 +7,8 @@
@teachpack["dir"]{Working with Files and Directories}
@declare-exporting[teachpack/htdp/dir]
@;declare-exporting[teachpack/htdp/dir]
@defmodule[#:require-form beginner-require htdp/dir]
The teachpack provides structures and operations for working with files and
directories:

View File

@ -6,7 +6,8 @@
@teachpack["docs"]{Manipulating Simple HTML Documents}
@declare-exporting[teachpack/htdp/docs]
@;declare-exporting[teachpack/htdp/docs]
@defmodule[#:require-form beginner-require htdp/docs]
The teachpack provides three operations for creating simple ``HTML'' documents:

View File

@ -6,7 +6,8 @@
@teachpack["draw"]{Simple Drawing}
@declare-exporting[teachpack/htdp/draw]
@;declare-exporting[teachpack/htdp/draw]
@defmodule[#:require-form beginner-require htdp/draw]
The teachpack provides two sets of functions: one for drawing into a canvas
and one for reacting to canvas events.

View File

@ -6,7 +6,8 @@
@teachpack["elevator"]{Controlling an Elevator}
@declare-exporting[teachpack/htdp/elevator]
@;declare-exporting[teachpack/htdp/elevator]
@defmodule[#:require-form beginner-require htdp/elevator]
The teachpack implements an elevator simulator.

View File

@ -6,7 +6,8 @@
@teachpack["graphing"]{Graphing Functions}
@declare-exporting[teachpack/htdp/graphing]
@;declare-exporting[teachpack/htdp/graphing]
@defmodule[#:require-form beginner-require htdp/graphing]
The teachpack provides two operations for graphing functions in the regular
(upper right) quadrant of the Cartesian plane (between 0 and 10 in both

View File

@ -6,7 +6,8 @@
@teachpack["guess"]{Guessing Numbers}
@declare-exporting[teachpack/htdp/guess]
@;declare-exporting[teachpack/htdp/guess]
@defmodule[#:require-form beginner-require htdp/guess]
The teachpack provides operations to play a guess-the-number game. Each
operation display a GUI in which a player can choose specific values for

View File

@ -6,7 +6,8 @@
@teachpack["gui"]{Simple Graphical User Interfaces}
@declare-exporting[teachpack/htdp/gui]
@;declare-exporting[teachpack/htdp/gui]
@defmodule[#:require-form beginner-require htdp/gui]
The teachpack provides operations for creating and manipulating graphical
user interfaces. We recommend using the @seclink["world"]{world teachpack}

View File

@ -6,7 +6,8 @@
@teachpack["hangman"]{Hangman}
@declare-exporting[teachpack/htdp/hangman]
@;declare-exporting[teachpack/htdp/hangman]
@defmodule[#:require-form beginner-require htdp/hangman]
The teachpack implements the callback functions for playing a
@emph{Hangman} game, based on a function designed by a student. The player

View File

@ -6,7 +6,8 @@
@teachpack["master"]{MasterMinding}
@declare-exporting[teachpack/htdp/master]
@;declare-exporting[teachpack/htdp/master]
@defmodule[#:require-form beginner-require htdp/master]
The teachpack implements GUI for playing a simple master mind-like game,
based on a function designed by a student. The player clicks on two colors

View File

@ -7,6 +7,9 @@
@teachpack["matrix"]{Matrix Operations}
@;declare-exporting[teachpack/htdp/matrix]
@defmodule[#:require-form beginner-require htdp/matrix]
The experimental teachpack supports matrices and matrix operations. A
matrix is just a rectangle of 'objects'. It is displayed as an image, just
like the images from @secref["image"]. Matrices are images and, indeed,
@ -20,8 +23,6 @@ row first, column second.
The operations aren't tuned for efficiency so don't expect to build
programs that process lots of data.
@declare-exporting[teachpack/htdp/matrix]
@deftech{Rectangle}
A Rectangle (of X) is a non-empty list of lists containing X where all
elements of the list are lists of equal (non-zero) length.

View File

@ -6,7 +6,8 @@
@teachpack["show-queen"]{Queens}
@declare-exporting[teachpack/htdp/show-queen]
@;declare-exporting[teachpack/htdp/show-queen]
@defmodule[#:require-form beginner-require htdp/show-queen]
The teachpack provides the operation @scheme[show-queen], which implements
a GUI for exploring the n-queens problem.

View File

@ -45,6 +45,12 @@ second one generalizes the first by adding interactive GUI features.
@; -----------------------------------------------------------------------------
@section[#:tag "simulations"]{Simple Simulations}
@defproc[(run-movie [r (and/c real? positive?)] [m [Listof image?]])
true]{
@scheme[run-movie] displays the list of images @scheme[m] at the rate of
@scheme[r] images per second.}
@defproc[(run-simulation
[w natural-number/c]
[h natural-number/c]