Standard Numeric Procedure. Determines if
num1 is equal to
num2
(<num1num2
...numn)
Standard Numeric Procedure.
Determines if
num1 is strictly less than
num2, and
num2 is strictly less than
num3 and so forth.
(<=num1num2
...numn)
Standard Numeric Procedure.
Determines if num1
is less than or equal to
num2, and
num2 is less than
or equal to num3
and so forth.
(>num1num2
...numn)
Standard Numeric Procedure.
Determines if num1
is strictly greater than
num2, and
num2 is strictly
greater than num3
and so forth.
(>=num1num2
...numn)
Standard Numeric Procedure.
Determines if num1
is greater than or equal to
num2, and
num2 is greater than
or equal to num3
and so forth.
(^andf1f2
...
fn)
Traditional Higher-Order Procedure.
A higher-order version of and. Creates
a new procedure that, when applied to some values, returns
(and (f1values)
(f2values)
...
(fnvalues)).
(^notpred?)
Traditional Higher-Order Procedure.
A higher-order version of not. Creates
a new procedure, that, when applied to some values, returns
the opposite of pred?. That is, (1)
if pred? returns a truish value when applied
to some parameters, the new procedure returns #f
when applied to those same parameters; (2) if
pred? returns false when applied to some
parameters, the new procedure returns #t when
applied to those same parameters.
(^orf1f2
...
fn)
Traditional Higher-Order Procedure.
A higher-order version of or. Creates
a new procedure that, when applied to some values, returns
(or (f1values)
(f2values)
...
(fnvalues)).
A
(absnum)
Standard Scheme Procedure.
Compute the absolute value of num.
(andexp1exp2 ...
expn)
Standard keyword.
Evaluate each expression in turn. If any of those values is false,
return false. Otherwise, return the value of the last expression.
(appendlst_0lst_1 ...
lst_n)
Standard List Procedure. Create a
new list by concatenating the elements of
lst_0, lst_1,
... lst_n.
C
(caarlst)
Standard List Procedure.
If lst's first element is a list,
gets the first element of that first element, the
the car of the car
of lst. If
lst is not a list, or its first element
is not a list, reports an error.
(cadrlst)
Standard List Procedure.
Get the second element of lst,
the car of the cdr
of lst
(caddrlst)
Standard List Procedure.
Get the third element of lst,
the car of the cdr
of the cdr
of lst.
(carlst)
Standard List Procedure.
Get the first element of lst.
(cdrlst)
Standard List Procedure.
Get a list the same as lst but without
the first element.
(cadrlst)
Standard List Procedure.
Get the second element of lst,
the car of the cdr
of lst
(ceilingnum)
Standard Scheme Procedure.
Find the smallest integer greater than or equal to
num. That is, round up.
(char?val)
Standard Character Predicate.
Determine if val is a character.
(char->integerch)
Standard Character Procedure.
Get ch's position in the collating
sequence.
(char<?ch1ch2)
Standard Character Comparator.
Determine if ch1 precedes
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char<=?ch1ch2)
Standard Character Comparator.
Determine if ch1 equals
ch2 or if
ch1 precedes
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char=?ch1ch2)
Standard Character Comparator.
Determine if ch1 and
ch2 are the same. Both
ch1 and ch2 must
be characters.
(char>=?ch1ch2)
Standard Character Comparator.
Determine if ch1 and ch2
are equal or if ch1 follows
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char>?ch1ch2)
Standard Character Comparator.
Determine if ch1 follows
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-alphabetic?ch)
Standard Character Predicate.
Determine if ch (which must be a
character) is an alphabetic character (in English, #\a, #\b, ... #\z,
#\A, #\B, ...., #\Z).
(char-ci<?ch1ch2)
Standard Character Comparator.
If both ch1 and ch2
are alphabetic characters (letters), determine if
ch1 naturally precedes
ch2, ignoring case.
If either is not alphabetic, determine if ch1 precedes
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-ci<=?ch1ch2)
Standard Character Comparator.
If both ch1 and ch2
are alphabetic characters (letters), determine if
ch1 naturally precedes or equals
ch2, ignoring case.
If either is not alphabetic, determine if ch1 equals
ch2 or if ch1 precedes
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-ci=?ch1ch2)
Standard Character Comparator.
If both ch1 and ch2
are alphabetic characters (letters), determine if
ch1 and ch2 represent
the same letter, ignoring case.
If either is not alphabetic, determine if ch1 follows
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-ci>=?ch1ch2)
Standard Character Comparator.
If both ch1 and ch2
are alphabetic characters (letters), determine if
ch1 naturally follows or equals
ch2, ignoring case. If either is not
alphabetic, determine if ch1 equals
ch2 or if ch1
follows ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-ci>?ch1ch2)
Standard Character Comparator.
If both ch1 and ch2
are alphabetic characters (letters), determine if
ch1 naturally follows
ch2, ignoring case.
If either is not alphabetic, determine if ch1 follows
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-downcasech)
Standard Character Procedure.
If ch is an upper-case character
(#\A, #\B, ... #\Z, in ASCII; potentially other characters in other
character sets), return the corresponding lower-case
character. Otherwise, return the same character.
(char-lower-case?ch)
Standard Character Predicate.
Determine if ch (which must be a
character) represents a lower-case character
(in English, #\a, #\b, ... #\z).
(char-upper-case?ch)
Standard Character Predicate.
Determine if ch (which must be a
character) represents an upper-case character
(in English, #\A, #\B, ... #\Z).
(char-numeric?ch)
Standard Character Predicate.
Determine if ch (which must be a
character) represents a digit in a number (traditionally,
#\0, #\1, ... #\9, although other systems have different
numeric characters).
(char-upcasech)
Standard Character Procedure.
If ch is a lower-case character
(#\a, #\b, ... #\z, in ASCII; potentially other characters in other
character sets), return the corresponding upper-case
character (#\A for #\a, #\B for #\b, etc.). Otherwise, return
the same character.
(char-whitespace?ch)
Standard Character Predicate.
Determine if ch (which must be a
character) represents a whitespace character, such as a space,
a tab, or a newline.
RackUnit procedure.
Evaluate expression and
expected and then compare them
for numeric equality (within epsilon).
If they are equal, do nothing. If they are not equal, print an
error message. If the optional message is included, also print
that message.
RackUnit procedure.
Evaluate expression and
expected and then compare them for
equality. If they are equal, do nothing. If they are not equal,
print an error message. If the optional message is included,
also print that message.
RackUnit procedure.
Evaluate expression and
expected and then compare them.
If they are not equal, do nothing. If they are equal,
print an error message. If the optional message is included,
also print that message.
RackUnit procedure.
Evaluate expression and determine whether
it is true (#t). If so, do nothing. If not,
print an error message. If the optional message is included,
also print that message.
(close-input-portinput-port)
Standard File Procedure.
Close an open input port. (It is an error to try to close
something that is not an input port, or an input port that
is already closed.)
(close-input-portinput-port)
Standard File Procedure.
Close an open input port. (It is an error to try to close
something that is not an input port, or an input port that
is already closed.)
(close-output-portoutput-port)
Standard File Procedure.
Close an open output port. (It is an error to try to close
something that is not an output port, or an output port that
is already closed.)
(color?val)
MediaScheme Color Procedure.
Checks to see if val is one of the various
valid forms of colors (integer encoded RGB colors, color names,
HSV lists, etc.).
(color->color-namestring)
MediaScheme Color Procedure.
Convert any of the myriad representations of colors to a
string that names a similar color. Note that this conversion
approximates the color as there are
many fewer names than colors.
(color->hsvcolor)
MediaScheme Color Procedure.
Convert any of the myriad representations of colors to a
corresponding HSV (hue, saturation, value) representation.
(color->irgbstring)
MediaScheme Color Procedure.
Convert any of the myriad representations of colors to a
corresponding integer-encoded RGB color.
(color->rgb-listcolor)
MediaScheme Color Procedure.
Convert the given color to a list of its three components
(red, green, and blue).
(color->stringcolor)
MediaScheme Color Procedure.
Convert the given color to a component string that is comparatively
easy for a novice to read. Warning! That string cannot be used
as a color.
Mediascheme Color Procedure.
Create a grid of colors with the specified number of columns.
Fills in the gird using the specified list of colors.
Each box in the grid has the specified width and height.
If the number of colors is not a multiple of the number of
columns, the remaining boxes are the background color.
(color-name?val)
MediaScheme Color Procedure.
Checks to see if val is a string representing a
color in the database of colors.
(color-name->irgbstring)
MediaScheme Color Procedure.
Get the integer-encoded RGB color that corresponds to the
given color name.
(color-representationcolor)
MediaScheme Color Procedure.
Determine what color representation is used for the the
given color. That representation is returned as a symbol.
If the value does not appear to be a color, returns #f.
MediaScheme Color Procedure.
Create an small image (“swatch”) that
shows the given colors. Permits up to six colors.
(complex?val)
Optional Scheme Procedure.
Determine whether val can be interpreted
as a complex number.
(composefg)
Traditional Higher-Order Procedure.
Build a one-parameter procedure that applies g to its
parameter, and then f to that result.
((compose f g) x)
is the same as (f (g x)).
(consvaluelst)
Standard List Procedure.
Create a new list by prepending value
to the front of lst.
(constantvalue)
Traditional Higher-Order Procedure.
Create a new function that always returns value,
no matter what parameters it is applied to.
(context-get-bgcolor)
MediaScheme GIMP Procedure.
Returns GIMP's current background color (as an RGB color).
(context-get-brush)
MediaScheme GIMP Procedure.
Get GIMP's active brush.
(context-get-color-names)
MediaScheme GIMP Procedure.
Get a vector of all the available color names.
(context-get-fgcolor)
MediaScheme GIMP Procedure.
Returns GIMP's current foreground color (as an RGB color).
(context-list-brushes)
MediaScheme GIMP Procedure.
List all valid brush names.
(context-list-brushespattern)
MediaScheme GIMP Procedure.
List all the valid brush names that contain pattern.
(context-list-colors)
MediaScheme GIMP Procedure.
List all valid color names.
(context-list-colorspattern)
MediaScheme GIMP Procedure.
List all the valid color names that contain pattern.
(context-list-fonts)
MediaScheme GIMP Procedure.
List all valid font names.
(context-list-fontspattern)
MediaScheme GIMP Procedure.
List all the available font names that contain pattern.
(context-set-bgcolor!color)
MediaScheme GIMP Procedure.
Sets GIMP's current background color to color.
MediaScheme GIMP Procedure.
Sets GIMP's current brush to brush-name. If the brush-size
is specified, also sets the size of brush.
Only works for selected brushes (typically, those
that start with a number, like "2. Hardness 100").
(context-set-fgcolor!color)
MediaScheme GIMP Procedure.
Sets GIMP's current foreground color to color.
(context-update-displays!)
MediaScheme GIMP Procedure.
Update all of the displays to show changes to images.
D
(delete-filefilename)
Common File Procedure.
Delete the file specified by filename. If the file doesn't exist,
reports an error.
(displayvalue)
Standard I/O Procedure.
Print a human-readable representation of
value on the screen.
(displayvalueoutput-port)
Standard File Procedure.
Print a human-readable representation of
value on the specified
port.
(drawing?value)
MediaScheme Drawing Procedure.
Determine if value can be interpreted
as a drawing.
drawing-blank
MediaScheme Drawing Constant.
An empty drawing. Included for the sake of completeness. Also
provides a useful base case for recursion over grouped drawings.
(drawing-blank?value)
MediaScheme Drawing Procedure.
Determine if value can be interpreted
as a blank drawing.
(drawing-bottomdrawing)
MediaScheme Drawing Procedure.
Determine the row of the bottom edge of a drawing.
(drawing-colordrawing)
MediaScheme Drawing Procedure.
Determine the color of a simple drawing. (Does not work
for compound drawings.)
(drawing-composelist-of-drawings)
MediaScheme Drawing Procedure.
Create a new drawing by overlaying all of individual
drawings in list-of-drawings. Note that
the drawings are stacked first to last, so the first drawing
in the list is at the bottom and the last in the list is at
the top.
(drawing-groupdrawing1drawing2
...
drawingn)
MediaScheme Drawing Procedure.
Create a new drawing by overlaying all of the individual
drawings. Note that the drawings are stacked first to last,
so drawing1 is at the bottom and
drawingn is at the top.
(drawing-heightdrawing)
MediaScheme Drawing Procedure.
Determine the approximate height of a drawing.
(drawing-hscaledrawingfactor)
MediaScheme Drawing Procedure.
Creates a new drawing by horizontally scaling
drawing
by factor. Note that every part of
the drawing is scaled horizontally, including the horizontal
distance of each component of the drawing from the origin.
(drawing-hshiftdrawingamt)
MediaScheme Drawing Procedure.
Creates a new drawing by shifting
drawing horizontally by
factor. If factor
is positive, the drawing is shifted to the right. If
factor is negative, the drawing is
shifted left by the absolute value of factor.
(drawing-leftdrawing)
MediaScheme Drawing Procedure.
Determine the column of the left edge of a drawing.
(drawing-outlinedrawingbrush)
MediaScheme Drawing Procedure.
Creates a new drawing by outlining each element in
drawing with brush.
Element colors are preserved. After outlining, no elements
of the resulting drawing are filled.
(drawing-recolordrawingcolor)
MediaScheme Drawing Procedure.
Creates a new drawing by recoloring
drawing in color.
Note that even if drawing contained
colors, the new drawing contains only a single color.
(drawing-render!drawingimage)
MediaScheme Drawing Procedure.
Render drawing on the specified
image, thereby changing the image. Expects that at least
part of the drawing fits within the confines of the image.
(drawing-rightdrawing)
MediaScheme Drawing Procedure.
Determine the column of the right edge of a drawing.
(drawing-scaledrawingfactor)
MediaScheme Drawing Procedure.
Creates a new drawing by scaling drawing
by factor. Note that every part of
the drawing is scaled, including both the horizontal and
vertical distance of each component
of the drawing from the origin.
(drawing->imagedrawingwidthheight)
MediaScheme Drawing Procedure.
Create a new image of the specified width and height that
contains the portion of drawing that
fits in the rectangular region bounded on the left by 0, on
the top by 0, on the right by width-1
and on the bottom by height-1.
(drawing-topdrawing)
MediaScheme Drawing Procedure.
Determine the row of the top edge of a drawing.
(drawing-typedrawing)
MediaScheme Drawing Procedure.
Determine the type of drawing represented. Returns a symbol:
ellipse for ellipses and circles,
rectangle for rectangles and squares,
group for grouped drawings, and
line for lines (not yet supported).
drawing-unit-circle
MediaScheme Drawing Constant.
A unit circle. That is, a circle with diameter 1, filled in
black, centered at (0,0).
drawing-unit-square
MediaScheme Drawing Constant.
A unit square. That is, a square with edge-length 1, filled in
black, centered at (0,0).
(drawing-vscaledrawingfactor)
MediaScheme Drawing Procedure.
Creates a new drawing by vertically scaling
drawing
by factor. Note that every part of
the drawing is scaled vertically, including the vertical distance
of each component of the drawing from the origin.
(drawing-vshiftdrawingamt)
MediaScheme Drawing Procedure.
Creates a new drawing by shifting
drawing vertically by
factor. If factor
is positive, the drawing is shifted downward. If
factor is negative, the drawing is
shifted upward by the absolute value of factor.
(drawing-widthdrawing)
MediaScheme Drawing Procedure.
Determine the width of a drawing.
E
(eof-object?val)
Standard File Procedure.
Determine if val is something returned by
read (or read-char or
peek-char) to indicate the end of input.
(errormessage)
Standard Procedure.
Print the message (which is typically a string) and then stop
the computation currently underway.
(errormessageval1 ... valn)
Standard Procedure.
Print the message (which is typically a string) and all of the
values. Then stop the computation currently in progress.
(even?int)
Standard Scheme Procedure.
Determine whether the integer value int is
even (that is, has a remainder of 0 when divided by 2).
(exact?num)
Standard Scheme Procedure.
Determine whether the numeric value num is
represented exactly (that is, not approximated).
(exact->inexactnum)
Standard Scheme Procedure.
Create an inexact representation of num.
(exptbasepower)
Standard Scheme Procedure.
Compute basepower.
F
(file-exists?filename)
Standard File Procedure.
Determine whether a file with the given name exists.
(filterpred?lst)
Traditional List Procedure.
Select the elements of lst for which
pred? holds.
(filter means to “filter in”,
not to “filter out”.)
(floornum)
Standard Scheme Procedure.
Find the largest integer less than or equal to
num. That is, round down.
(for-eachproc!lst)
Standard Higher-Order List Procedure.
Apply proc! to each element of the
given list. Called primarily for side effects.
H
(hscale-drawingfactordrawing)
MediaScheme Drawing Procedure.
Creates a new drawing by horizontally scaling
drawing
by factor. Note that every part of
the drawing is scaled horizontally, including the horizontal
distance of each component of the drawing from the origin.
(hshift-drawingamtdrawing)
MediaScheme Drawing Procedure.
Creates a new drawing by shifting
drawing horizontally by
factor. If factor
is positive, the drawing is shifted to the right. If
factor is negative, the drawing is
shifted left by the absolute value of factor.
I
(iftestconsequentalternative)
Standard keyword.
Evaluate
test. If its value is truish (that is,
anything but false), evaluate consequent
and return its value. If the value of test is false (#f), evaluate
and return alternative.
(image?val)
MediaScheme GIMP Procedure.
Determine if val is an image.
MediaScheme GIMP Procedure.
Draw a line in image from (col1,row1) to (col2,row2). Uses the
airbrush and foreground color. The pressure should be between
0 and 100 (inclusive).
(image-blot!imagecolrow)
MediaScheme GIMP Procedure.
Draw a spot in image at (col,row) with the current brush and
foreground color.
(image-computepos2colorwidthheight)
MediaScript GIMP Procedure. Create a new
width-by-height image by using pos2color
(a function of the form (lambda (col row) color))
to compute the color at each position in the image.
MediaScheme GIMP Procedure.
Copy a width-by-height
region from source to target.
The (col,row) pairs specify the top-left corner of the region in
each image.
(image-draw-line!imagecol1row1col2row2)
MediaScheme GIMP Procedure.
Draw a line in image from (col1,row1) to (col2,row2). Uses the
current brush and foreground color.
(image-fill-selection!image)
MediaScheme GIMP Procedure.
Fill the selected region of the given image with the current
foreground color.
(image-get-pixelimagecolumnrow)
MediaScheme GIMP Procedure.
Get the pixel at the specified position in the
image.
(image-heightimage)
MediaScheme GIMP Procedure.
Determine the height of the given image
(image-loadfilename)
MediaScheme GIMP Procedure.
Load an image from a file. The name of the file is a string (and,
unless a named value, typically surrounded by quotation marks).
(image-newwidthheight)
MediaScheme GIMP Procedure.
Create a new image of specified width and height.
(image-recompute!imagefun)
MediaScheme GIMP Procedure.
Scans through the image, replacing the color at each pixel in
the selected region (or the whole image, if nothing is selected)
with the result of applying fun to the column
and row of the pixel.
fun
should therefore have the form (lambda (col row) color).
If fun returns IRGB-TRANSPARENT,
leaves the pixel unchanged.
(image-redo!imagefun)
MediaScheme GIMP Procedure.
Scans through the image, replacing the color at each pixel in
the selected region (or the whole image, if nothing is selected)
with the result of applying fun to the column,
row, and current color at each position. fun
should therefore have the form (lambda (col row color)
newcolor).
If fun returns IRGB-TRANSPARENT,
leaves the pixel unchanged.
(image-refresh-display!image)
MediaScheme GIMP Procedure.
Refreshes the display of the given image. (While
context-update-displays! should update
displays, it doesn't always work. This procedure forces an
update. And it still doesn't always work. Doing a new call
to image-show seems to refresh all copies
of the image.)
(image-saveimagefname)
MediaScheme GIMP Procedure.
Save image in the specified file
(which should provide the full path to the file). The type
of the image (JPEG, GIF, PNG, etc.) is determined by the suffix
of the file name.
(image-select-all!image)
MediaScheme GIMP Procedure.
Selects all of the pixels in the image.
MediaScheme GIMP Procedure.
Select an ellipse whose left margin is
left, top margin is
top, width is width
and height is height.
If selection-type is
REPLACE, the ellipse replaces the
current selection. If selection-type
is ADD, the ellipse is added to the
current selection. If selection-type
is SUBTRACT, the ellipse is subtracted from
the current selection. If selection-type
is INTERSECT, the ellipse is intersected
with the current selection (that is, only points that are in
both the current selection and the ellipse remain selected).
(image-select-inverse!image)
MediaScheme GIMP Procedure.
Selects the inverse of all selected images in the image.
(image-select-nothing!image)
MediaScheme GIMP Procedure.
Clears the current selection. Afterwards, nothing is selected.
MediaScheme GIMP Procedure.
Select a polygon described by the given list of positions
(each created by position-new).
If selection-type is
REPLACE, the polygon replaces the
current selection. If selection-type
is ADD, the polygon is added to the
current selection. If selection-type
is SUBTRACT, the polygon is subtracted from
the current selection. If selection-type
is INTERSECT, the polygon is intersected
with the current selection (that is, only points that are in
both the current selection and the polygon remain selected).
MediaScheme GIMP Procedure.
Select an rectangle whose left margin is
left, top margin is
top, width is width
and height is height.
If selection-type is
REPLACE, the rectangle replaces the
current selection. If selection-type
is ADD, the rectangle is added to the
current selection. If selection-type
is SUBTRACT, the rectangle is subtracted from
the current selection. If selection-type
is INTERSECT, the rectangle is intersected
with the current selection (that is, only points that are in
both the current selection and the rectangle remain selected).
(image-set-pixel!imagecolumnrowrgb-color)
MediaScheme GIMP Procedure.
Set the pixel at the specified position to the new color.
(image-showimage)
MediaScheme GIMP Procedure.
Opens a new window with the image.
(image-stroke-selection!image)
MediaScheme GIMP Procedure.
Traces the edge of the selected region of the given image with the
current brush and foreground color.
(image-transform!imagefun)
MediaScheme GIMP Procedure.
Transform image in place by setting
each pixel to the result of applying fun to
that current pixel color.
(image-transform-pixel!imagecolumnrowfunc)
MediaScheme GIMP Procedure.
Modify the pixel at
(col,row)
in image by applying
func to its old color and setting that
pixel to the resulting color.
(image-variantimagefun)
MediaScheme GIMP Procedure.
Create a new image of the same width and height as
image, each of whose pixels is computed
by applying fun to the color of the
corresponding pixel in image.
(image-widthimage)
MediaScheme GIMP Procedure.
Determine the width of the given image.
(inexact?num)
Standard Scheme Procedure.
Determine whether the numeric value num is
represented inexactly (that is, approximated).
(inexact->exactnum)
Standard Scheme Procedure.
Create an exact representation of num.
(Of course, if num was already
approximated, the result, while exact, still approximates
whatever num approximated.)
(input-port?val)
Standard File Predicate.
Determine if val is an open input port.
(integer?val)
Standard Scheme Procedure.
Determine whether val is an integer.
(integer->charn)
Standard Character Procedure.
Get the nth character in the
collating sequence.
(irgbrgb)
MediaScheme Color Procedure.
Build an integer-encoded RGB color whose red, green, and blue
components are the specified values, each of which is an integer
between 0 and 255, inclusive. If given real values, rounds
them to the nearest integer. If given values outside the bouds,
caps them at the bounds.
(irgb?value)
MediaScheme Color Predicate.
Determine if value can be interpreted
as an integer-encoded RGB color. Warning! Almost any integer
can be interpreted as an integer-encoded RGB color.
(irgb->color-nameirgb-color)
MediaScheme Color Procedure.
Convert the given integer-encoded RGB color to a string
that names a similar color. Note that this conversion
approximates the RGB color as there are
many fewer names than colors.
(irgb->hsvirgb-color)
MediaScheme Color Procedure.
Convert the given integer-encoded RGB color to a list
corresponding to the HSV (hue, saturation, value)
representaiton.
(irgb->rgb-listirgb-color)
MediaScheme Color Procedure.
Convert the given color to a list of its three components.
(irgb->stringirgb-color)
MediaScheme Color Procedure.
Convert the given RGB color to an easy-to-read string. (The string
is not so easy to convert back to an RGB color.)
(irgb-addirgb-color-1irgb-color-2)
MediaScheme Color Procedure.
Add the corresponding RGB components of
irgb-color-1 and
irgb-color-2. If any component sum
is greater than 255, uses 255 for the resulting component.
(irgb-averageirgb-color-1irgb-color-2)
MediaScheme Color Procedure.
Average the corresponding RGB components of
irgb-color-1 and
irgb-color-2.
(irgb-bluerirgb-color)
MediaScheme Color Procedure.
Build a bluer version of the given color.
(irgb-blueirgb-color)
MediaScheme Color Procedure.
Get the blue component of an integer-encoded RGB color.
(irgb-complementirgb-color)
MediaScheme Color Procedure.
Compute the psuedo-complement of the given
color.
(irgb-darkerirgb-color)
MediaScheme Color Procedure.
Build a darker version of the given color.
(irgb-greenerirgb-color)
MediaScheme Color Procedure.
Build a greener version of the given color.
(irgb-greencolor)
MediaScheme Color Procedure.
Get the green component of an integer-encoded RGB color.
(irgb-lighterirgb-color)
MediaScheme Color Procedure.
Build a lighter version of the given color.
(rgb-list->irgbrgb-lst)
MediaScheme Color Procedure.
Converts a list representation of a color of the form
(r g b) into an integer-encoded RGB color.
(irgb-newrgb)
MediaScheme Color Procedure.
Build an integer-encoded RGB color whose red, green, and blue
components are the specified values, each of which is an integer
between 0 and 255, inclusive. If given real values, rounds
them to the nearest integer. If given values outside the bouds,
caps them at the bounds.
(irgb-phaseshiftirgb-color)
MediaScheme Color Procedure.“Phase shift” the color by adding 128 to components
less than 128 and subtracting 128 from components greater than
128.
(irgb-redderirgb-color)
MediaScheme Color Procedure
Build a redder version of the given color.
(irgb-redirgb-color)
MediaScheme Color Procedure.
Get the red component of an integer-encoded RGB color.
(irgb-rotateirgb-color)
MediaScheme Color Procedure.
Rotate the three components of the given color, setting the red
component to the value of the green component, the green component
to the value of the blue component, and blue compnent to the value
of the red component.
(irgb-subtractirgb-color-1irgb-color-2)
MediaScheme Color Procedure.
Subtract the RGB components of
irgb-color-2 from the corresponding
components of
irgb-color-1. If any component difference
is less than 0, uses 0 for the resulting component.
L
(lambda(params)expression1
...
expressionn)
Standard Keyword.
A procedure which takes as input the names listed in
params, does the computation indicated
by the expressions, and returns the value of the last expression.
(left-sectionbinprocleft)
Traditional Higher-Order Procedure.
Given a two-parameter procedure and a value, creates a new
anonymous one-parameter procedure by filling in the first (left)
parameter of the procedure. The new procedure, when applied to
a value, v, returns
(binprocleftv).
(listval_0val_1 ...
val_n)
Standard List Procedure. Create a
new list of size n+1 of the form
(val_0val_1
... val_n).
(list->stringchar-list)
Standard String Procedure.
Convert char-list (which must be a
list of characters) to a string.
The ith element of the list becomes the
ith character in the string.
(list->vectorlst)
Standard Vector Procedure.
Convert lst to a vector so that
the ith value in the vector is the same as the ith value in the lst.
(list-droplstn)
List Procedure.
Build a new list that consists of all but the first
n elements of lst.
(list-reflstn)
Standard List Procedure.
Get the nth element of
lst. Note that elements are numbered
starting at 0.
(list-takelstn)
List Procedure.
Build a new list that consists of the first
n elements of lst.
(l-sbinprocleft)
Traditional Higher-Order Procedure.
A shorthand for left-section.
M
(make-listnval)
Customary List Procedure.
Make a new list that consists of n
copies of val.
(make-stringlengthch)
Standard String Procedure.
Create a new string of length length,
containing only copies of ch.
(make-vectorlengthval)
Standard Vector Procedure.
Create a new vector of length length,
containing only copies of val.
(mapfunclst)
Standard Higher-Order List Procedure.
Create a new list, each of whose elements is computed by applying
func to the corresponding element of
lst.
(maxv1v2)
Standard Scheme Procedure.
Find the larger of v1 and
v2.
(maxv1v2
...
vn)
Standard Scheme Procedure.
Find the largest of v1
through vn.
(membervallst)
Standard List Procedure.
Determine if val appears in
lst. If so, returns the sublist
that starts with val.
If not, returns false
(#f).
(member?vallst)
MediaScheme List Procedure.
Determine if val appears in
lst. If so, returns true
(#t). If not, returns false
(#f).
(minv1v2)
Standard Scheme Procedure.
Find the smaller of v1 and
v2.
(minv1v2
...
vn)
Standard Scheme Procedure.
Find the smallest of v1
through vn.
(modulovaluemodulus)
Standard Scheme Procedure.
In a number line segmented into
modulus-sized sections, gives the
offset of value from the start of its
section.
N
(negative?num)
Standard Scheme Procedure.
Determine whether the numeric value num is
negative (less than zero).
(newline)
Standard I/O Procedure.
Write a newline (carriage return) to the screen.
(newlineoutput-port)
Standard File Procedure.
Write a newline (carriage return) to the specified
output port.
(null?lst)
Standard list predicate.
Checks if lst is the empty list.
null
Standard list constant.
The empty list.
(number?val)
Standard Scheme Procedure.
Determine if val is a number.
(number->stringnum)
Standard String Procedure.
Convert num to an appropriate textual
representation.
O
(of1f2
...
fn-1fn)
Traditional Higher-Order Procedure.
Build a one-parameter procedure that applies each
f, in turn, starting with
fn and
working backwards. The composition, when applied to a value,
x, produces the same result as
(f1
(f2
(...
(fn-1
(fn x))))).
(odd?int)
Standard Scheme Procedure.
Determine whether the integer value int is
odd (that is, has a remainder of 1 when divided by 2).
(open-input-filefilename)
Standard File Procedure.
Open the specified file for reading. Returns an input port.
(open-output-filefilename)
Standard File Procedure.
Open the specified file for writing. Returns an output port.
(orexp1exp2 ...
expn)
Standard keyword.
Evaluate each expression in turn. If any of those values is true,
return true. Otherwise, return the value of the last expression.
(output-port?val)
Standard File Predicate.
Determine if val is an open output port.
P
(peek-char)
Standard I/O Procedure.
Determine the next character available from the keyboard (or
other standard input port), but do not read over it.
(peek-charinput-port)
Standard File Procedure.
Determine the next character available on the specified port.
If no characters remain, returns the end-of-file object.
(pointcolrow)
MediaScheme Point Procedure.
Build a new value that represents the point
at (col,row).
(point?value)
MediaScheme Point Procedure.
Determine if value is a point (or can
be interpreted as such).
(point-colp)
MediaScheme Point Procedure.
Extract the column (x value) of point p.
(point-distancep1p2)
MediaScheme Point Procedure.
Compute the distance between p1 and
p2.
(point-interpolatep1p2amt)
MediaScheme Point Procedure.
Create a new point which is amt percent
(expressed as a real number between 0 and 1) of the way from
p1 to p2
(point-newcolrow)
MediaScheme Point Procedure.
Build a new value that represents the point
at (col,row).
(point-offsetpointhoffvoff)
MediaScheme Point Procedure.
Create a new point that is offset from point
horizontally by hoff and vertically
by voff.
(point-rowp)
MediaScheme Point Procedure.
Extract the row (y value) from point p.
(positive?num)
Standard Scheme Procedure.
Determine whether the numeric value num is
positive (greater than zero).
(pressure-valid?val)
MediaScheme GIMP Procedure.
Determine whether the value is a valid pressure. Used
primarily for precondition testing.
Q
(quotientdividenddivisor)
Standard Scheme Procedure.
Find the quotient of dividend and
divisor, both of which must be integers.
The quotient is the whole part of the result of dividing
dividend by divisor.
R
(random-pointsncolsrows)
MediaScheme Point Procedure.
Create n points, each of which is
difficult to predict and each with a non-negative column less
than cols and a non-negative row less
than rows.
(rational?val)
Optional Scheme Procedure.
Determine whether val can be interpreted
as a rational number.
(read)
Standard I/O Procedure.
Read the next value available from the keyboard.
(readinput-port)
Standard File Procedure.
Read the next value available on the specified port.
If no characters remain, returns the end-of-file object.
(read-char)
Standard I/O Procedure.
Read the next character available from the keyboard (or other
standard input port).
(read-charinput-port)
Standard File Procedure.
Read the next character available on the specified port.
If no characters remain, returns the end-of-file object.
(real?val)
Standard Scheme Procedure.
Determine whether val is a real number.
(recolor-drawingcolordrawing)
MediaScheme Drawing Procedure.
Creates a new drawing by recoloring
drawing in color.
Note that even if drawing contained
colors, the new drawing contains only a single color.
(region-scanimagelefttopwidthheightproc!)
MediaScheme GIMP Procedure.
Scans through a region of the image, applying proc! at
each position in the region. proc! should have the
form (lambda (col row color) ...). In contrast to
many of the other region procedures, region-scan is
guaranteed to scan row-by-row from top-to-bottom, scanning each
row from left to right.
(remainderdividenddivisor)
Standard Scheme Procedure.
Compute the remainder after doing whole-number division of
dividend by divisor.
(repeatiproc!)
Extended Scheme Procedure.
Call proc! (a zero-parameter procedure,
a.k.a., a “thunk”) i times.
Standard List Procedure.
Build a new list whose elements are the same as those of
lst, but in the opposite order.
(right-sectionbinprocright)
Traditional Higher-Order Procedure.
Given a two-parameter procedure and a value, creates a new
anonymous one-parameter procedure by filling in the second (right)
parameter of the procedure. The new procedure, when applied to
a value, v, returns
(binprocvright).
(roundnum)
Standard Scheme Procedure.
Round num toward the nearest integer.
If the decimal portion of num is greater
than 1/2, rounds up. If the decimal portion is less than
1/2, rounds down. If the decimal portion equals 1/2, may
round in either direction. (In most implementations,
numbers with fractional portions equal to 1/2 round toward
the even number.)
(r-sbinprocright)
Traditional Higher-Order Procedure.
A shorthand for right-section.
S
(scale-drawingfactorgdrawing)
MediaScheme Drawing Procedure.
Creates a new drawing by scaling drawing
by factor. Note that every part of
the drawing is scaled, including both the horizontal and
vertical distance of each component
of the drawing from the origin.
Mediascheme Higher-order Procedure/Macro.
Creates a new procedure by specifying some
of the parameters to procedure, leaving
the rest as parameters for the result procedure. Holes
(parameters for the result proedure) are indicated with the
<> symbol.
(string?val)
Standard String Predicate.
Determine if val is a string.
(string->numberstr)
Standard String Procedure.
Given a string that naturally represents a number (e.g.,
"23" or "3.14", or even
"2.11e-5"), return the corresponding number.
(substringstrstartend)
Standard String Procedure.
Create a new string by selecting the characters at positions
start to end-1
of str. Note that
substring, like string-ref
uses 0-based indexing.
(string<?str1str2)
Standard String Procedure.
Determine whether str1 lexicographically
precedes str2.
Both str1 and str2
must be strings.
(string<=?str1str2)
Standard String Procedure.
Holds if str1 is either the same as
str2 or if str1
lexicographically precedes str2.
Both str1 and str2
must be strings.
(string=?str1str2)
Standard String Procedure.
Holds if str1 is the same as
str2.
Both str1 and str2
must be strings.
(string>=?str1str2)
Standard String Procedure.
Holds if str1 is either the same as
str2 or if str1
lexicographically follows str2.
Both str1 and str2
must be strings.
(string>?str1str2)
Standard String Procedure.
Determine whether str1 lexicographically
follows str2.
Both str1 and str2
must be strings.
(stringch_0ch_1
...
ch_n)
Standard String Procedure.
Create a new string of length n+1,
by concatenating all of
ch_0 through ch_n.
(string-appendstr_0str_1
...
str_n)
Standard String Procedure.
Create a new string of by joining together
str through str_n
in order. (Much like append, but for
strings, rather than lists.)
(string-ci<?str1str2)
Standard String Procedure.
Determine whether str1 lexicographically
precedes str2, ignoring case.
Both str1 and str2
must be strings.
(string-ci<=?str1str2)
Standard String Procedure.
Holds if str1 is either the same as
str2 or if str1
lexicographically precedes str2,
ignoring case.
Both str1 and str2
must be strings.
(string-ci=?str1str2)
Standard String Procedure.
Holds if str1 is the same as
str2, ignoring case.
Both str1 and str2
must be strings.
(string-ci>=?str1str2)
Standard String Procedure.
Holds if str1 is either the same as
str2 or if str1
lexicographically follows str2, ignoring case.
Both str1 and str2
must be strings.
(string-ci>?str1str2)
Standard String Procedure.
Determine whether str1 lexicographically
follows str2, ignoring case.
Both str1 and str2
must be strings.
(string-lengthstr)
Standard String Procedure.
Determine the number of characters in str.
(string-refstrpos)
Standard String Procedure.
Extract the character at a specified position from a string. Like
list-ref, string-ref
presupposes zero-based indexing; the position is specified by
the number of characters that precede it in the string. Hence,
the initial character in the string is at position 0, the next
at position 1, and so on.)
(string->liststr)
Standard String Procedure.
Convert str to a list of characters.
The ith element of the list is the
ith character in the string.
T
(test-casedescriptioncheck-1 ...
check-n)
RackUnit procedure.
Create a new test case by running a series of checks.
RackUnit procedure.
Create a new test suite that groups together a variety of
checks, tests, and other suites. Unlike tests and checks,
which are executed immediately, test suites are objects
that can be run separately.
(truncatenum)
Standard Scheme Procedure.
Remove any fractional part from num.
That is, round toward zero.
(turtle-brushturtle)
MediaScheme Turtle Procedure.
Get the brush the turtle uses to draw.
(turtle-brush-sizeturtle)
MediaScheme Turtle Procedure.
Get the size of the brush that the turtle uses to draw.
(turtle-cloneturtle)
MediaScheme Turtle Constructor.
Make a clone of turtle
(same position, direction, color, brush, etc.).
(turtle-colturtle)
MediaScheme Turtle Procedure.
Get the column of the point at which the turtle resides.
(turtle-colorturtle)
MediaScheme Turtle Procedure.
Get the color of the brush that the turtle uses to draw.
(turtle-down!turtle)
MediaScheme Turtle Procedure.
Put turtle's brush down. When the turtle
moves forward, it draws with the brush.
(turtle-face!turtleangle)
MediaScheme Turtle Procedure.
Make turtle face the direction specified by
angle (clockwise
from right).
(turtle-forward!turtledistance)
MediaScheme Turtle Procedure.
Moves turtle forward by the specified distance.
(turtle-newimage)
MediaScheme Turtle Constructor.
Build a new turtle that draws on image.
(turtle-rowturtle)
MediaScheme Turtle Procedure.
Get the row of the point at which the turtle resides.
(turtle-set-brush!turtlebrush)
MediaScheme Turtle Procedure.
Set the brush that turtle draws with.
(turtle-set-color!turtlecolor)
MediaScheme Turtle Procedure.
Set the color in which turtle draws.
(turtle-teleport!turtlecolrow)
MediaScheme Turtle Procedure.
Move turtle to
(col,row).
Do not draw along the way.
(turtle-turn!turtleangle)
MediaScheme Turtle Procedure.
Rotate turtle clockwise by
angle degrees.
(turtle-up!turtle)
MediaScheme Turtle Procedure.
Lifts turtle's brush. When
turtle moves forward, it
will not draw.
(turtle-worldturtle)
MediaScheme Turtle Procedure.
Determine the world on which turtle
resides.
U
(usleepusec)
Optional Scheme Procedure.
Pause for usec microseconds.
V
(vectorval_0val_1 ...
val_n)
Standard Vector Procedure.
Create a new vector of size n+1 of the form
#(val_0val_1
... val_n).
(vector?val)
Standard Vector Predicate.
Determine if val is a vector.
(vector->listvec)
Standard Vector Procedure.
Convert vec to a list so that
the ith value in the list is the same as the ith value in the vector.
(vector-fill!vecval)
Standard Vector Procedure.
Fill vec with multiple copies of
val.
(vector-lengthvec)
Standard Vector Procedure.
Determine the size of vec.
(vector-refvecn)
Standard Vector Procedure.
Get the nth element of
vec. Note that elements are numbered
starting at 0.
(vector-set!veckval)
Standard Vector Procedure.
Set the kth element of
vec to val.
(Note that vectors use 0-based indexing.)
(vscale-drawingfactordrawing)
MediaScheme Drawing Procedure.
Creates a new drawing by vertically scaling
drawing
by factor. Note that every part of
the drawing is scaled vertically, including the vertical distance
of each component of the drawing from the origin.
(vshift-drawingamtdrawing)
MediaScheme Drawing Procedure.
Creates a new drawing by shifting
drawing vertically by
factor. If factor
is positive, the drawing is shifted downward. If
factor is negative, the drawing is
shifted upward by the absolute value of factor.
W
(whentestexp1exp2 ...
expn)
Optional Scheme Keyword.
Evaluate test. If it holds, evaluate
each expression in turn. Otherwise, do nothing.
(writevalue)
Standard File Procedure.
Print the verbose representation of the specified value to
standard output.
(writevalueoutput-port)
Standard File Procedure.
Print the verbose representation of the specified value to
the specified port.
(write-charch)
Standard I/O Procedure.
Write the the given character to the screen.
(write-charchoutput-port)
Standard File Procedure.
Write the the given character to the specified port.
Z
(zero?num)
Standard Scheme Procedure.
Determine whether the numeric value num is
zero.