(=
num1
num2)
num1 is equal to
num2(<
num1
num2
...numn)
num1 is strictly less than
num2, and
num2 is strictly less than
num3 and so forth.
(<=
num1
num2
...numn)
num1 is less than or
equal to num2, and
num2 is less than
or equal to num3
and so forth.
(>
num1
num2
...numn)
num1 is strictly greater than
num2, and
num2 is strictly greater than
num3 and so forth. (>=
num1
num2
...numn)
num1 is greater than
or equal to num2,
and num2
is greater than or equal to
num3 and so forth.
(and
exp1
exp2 ...
expn)
(car
lst)
lst.
(cdr
lst)
lst but without
the first element. (char?
val)
val is a character.
(char->integer
ch)
ch's position in the collating
sequence.
(char<?
ch1 ch2)
ch1 precedes
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char<=?
ch1 ch2)
ch1 equals
ch2 or if
ch1 precedes
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char=?
ch1 ch2)
ch1 and
ch2 are the same. Both
ch1 and ch2 must
be characters.
(char>=?
ch1 ch2)
ch1 and ch2
are equal or if ch1 follows
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char>?
ch1 ch2)
ch1 follows
ch2 in the collating sequence.
Both ch1 and ch2
must be characters.
(char-alphabetic?
ch)
ch (which must be a
character) is an alphabetic character (in English, #\a, #\b, ... #\z,
#\A, #\B, ...., #\Z).
(char-ci<?
ch1 ch2)
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<=?
ch1 ch2)
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=?
ch1 ch2)
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>=?
ch1 ch2)
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>?
ch1 ch2)
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-downcase
ch)
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)
ch (which must be a
character) represents a lower-case character
(in English, #\a, #\b, ... #\z).
(char-upper-case?
ch)
ch (which must be a
character) represents an upper-case character
(in English, #\a, #\b, ... #\z).
(char-numeric?
ch)
ch (which must be a
character) represents a digit in a number (traditionally,
#\0, #\1, ... #\9, although other systems have different
numeric characters).
(char-upcase
ch)
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)
ch (which must be a
character) represents a whitespace character, such as a space,
a tab, or a newline.
(close-input-port
input-port)
(close-output-port
output-port)
(cname?
val)
(cname->rgb
string)
(color->rgb
string)
color-black
color-blue
color-green
color-red
color-transparent
image-compute-pixels!. If the color function
returns color-transparent for a particular
position, the color at that position is left unchanged.
color-white
(compose
f
g)
((compose f g) x)
is the same as (f (g x)).
(cons
value
lst)
value
to the front of lst.
(context-get-bgcolor)
(context-get-fgcolor)
(context-list-colors)
(context-get-colors
str)
(display
value)
value on the screen.
(display
value
output-port)
value on the specified
port.
(drawing-bottom
drawing)
(drawing-brush
drawing)
(drawing-color
drawing)
(drawing-filled?
drawing)
(drawing-fill
drawing)
drawing.
Element colors are preserved. After filling, no elements
of the resulting drawing are outlined.
(drawing-group
drawing1
drawing2
...
drawingn)
drawing1 is at the bottom and
drawingn is at the top.
(drawing-height
drawing)
(drawing-hscale
drawing
factor)
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-hshift
drawing
amt)
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-join
drawing1
drawing2)
drawing2
on top of drawing1.
(drawing-left
drawing)
(drawing-outline
drawing
brush)
drawing with brush.
Element colors are preserved. After outlining, no elements
of the resulting drawing are filled.
(drawing-recolor
drawing
color)
drawing in color.
Note that even if drawing contained
colors, the new drawing contains only a single color.
(drawing-right
drawing)
(drawing-scale
drawing
factor)
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->image
drawing
width
height)
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-top
drawing)
(drawing-type
drawing)
ellipse for ellipses and circles,
rectangle for rectangles and squares,
group for grouped drawings, and
line for lines (not yet support).
drawing-unit-circle
drawing-unit-square
(drawing-vscale
drawing
factor)
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-vshift
drawing
amt)
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-width
drawing)
(eof-object?
val)
val is something returned by
read (or read-char or
peek-char) to indicate the end of input.
(file-exists?
filename)
(foreach!
func
lst)
func on each element of the given list.
Called primarily for side effects.
(if
test
consequent
alternative)
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)
val is an image.
(image-compute-pixels!
image
first-col
first-row
last-col
last-row
function)
function to the position of
the pixel. function must be a function
from position to rgb-color. Warning!
The current version is buggy, and may affect other pixels.
(image-get-pixel
image
column
row)
(image-height
image)
(image-load
filename)
(image-new
width
height)
(image-set-pixel!
image
column
row
rgb-color)
(image-show
image)
(image-transform!
image
fun)
image in place by setting
each pixel to the result of applying fun to
that current pixel color.
(image-transform-pixel!
image
column
row
func)
col,row)
in image by applying
func to its old color and setting that
pixel to the resulting color.
(image-variant
image
fun)
image, each of whose pixels is computed
by applying fun to the color of the
corresponding pixel in image.
(image-width
image)
(input-port?
val)
val is an open input port.
(integer->char
n)
nth character in the
collating sequence.
(lambda
(params)
expression1
...
expressionn)
params, does the computation indicated
by the expressions, and returns the value of the last expression.
(list
val_0
val_1 ...
val_n)
n+1 of the form
(val_0 val_1
... val_n).
(list->rgb
rgb-lst)
(r g b) into an RGB color.
(list->string
char-list)
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->vector
lst)
lst to a vector so that
the ith value in the vector is the same as the ith value in the lst.
(list-ref
lst
n)
nth element of
lst. Note that elements are numbered
starting at 0.
(make-string
length
ch)
length,
containing only copies of ch.
(make-vector
length
val)
length,
containing only copies of val.
(map
func
lst)
func to the corresponding element of
lst.
(newline)
(newline
output-port)
(null?
lst)
lst is the empty list.
null
(number->string
num)
num to an appropriate textual
representation.
(o
f1
f2
...
fn-1
fn)
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))))).
(open-input-file
filename)
(open-output-file
filename)
(or
exp1
exp2 ...
expn)
(output-port?
val)
val is an open output port.
(peek-char)
(peek-char
input-port)
(position-col
pos)
pos.
(position-new
col
row)
col,row).
(position-row
pos)
(read)
(read
input-port)
(read-char)
(read-char
input-port)
(reverse
lst)
lst, but in the opposite order.
(rgb?
value)
value can be interpreted
as an RGB color.
(rgb->cname
rgb-color)
(rgb->list
rgb-color)
(rgb->string
rgb-color)
(rgb-bluer
rgb-color)
(rgb-blue
color)
(rgb-complement
rgb-color)
(rgb-darker
rgb-color)
(rgb-greener
rgb-color)
(rgb-green
color)
(rgb-lighter
rgb-color)
(rgb-new
r
g
b)
(rgb-phaseshift
rgb-color)
(rgb-redder
rgb-color)
(rgb-red
color)
(rgb-rotate
rgb-color)
(string?
val)
val is a string.
(string->number
str)
"23" or "3.14", or even
"2.11e-5"), return the corresponding number.
(substring
str
start
end)
start to end-1
of str. Note that
substring, like string-ref
uses 0-based indexing.
(string<?
str1
str2)
str1 lexicographically
precedes str2.
Both str1 and str2
must be strings.
(string<=?
str1
str2)
str1 is either the same as
str2 or if str1
lexicographically precedes str2.
Both str1 and str2
must be strings.
(string=?
str1
str2)
str1 is the same as
str2.
Both str1 and str2
must be strings.
(string>=?
str1
str2)
str1 is either the same as
str2 or if str1
lexicographically follows str2.
Both str1 and str2
must be strings.
(string>?
str1
str2)
str1 lexicographically
follows str2.
Both str1 and str2
must be strings.
(string
ch_0
ch_1
...
ch_n)
n+1,
by concatenating all of
ch_0 through ch_n.
(string-append
str_0
str_1
...
str_n)
str through str_n
in order. (Much like append, but for
strings, rather than lists.)
(string-ci<?
str1
str2)
str1 lexicographically
precedes str2, ignoring case.
Both str1 and str2
must be strings.
(string-ci<=?
str1
str2)
str1 is either the same as
str2 or if str1
lexicographically precedes str2,
ignoring case.
Both str1 and str2
must be strings.
(string-ci=?
str1
str2)
str1 is the same as
str2, ignoring case.
Both str1 and str2
must be strings.
(string-ci>=?
str1
str2)
str1 is either the same as
str2 or if str1
lexicographically follows str2, ignoring case.
Both str1 and str2
must be strings.
(string-ci>?
str1
str2)
str1 lexicographically
follows str2, ignoring case.
Both str1 and str2
must be strings.
(string-length
str)
str.
(string-ref
str
pos)
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->list
str)
str to a list of characters.
The ith element of the list is the
ith character in the string.
(throw
message)
(throw
message
val1 ... valn)
(vector
val_0
val_1 ...
val_n)
n+1 of the form
#(val_0 val_1
... val_n).
(vector?
val)
val is a vector.
(vector->list
vec)
vec to a list so that
the ith value in the list is the same as the ith value in the vector.
(vector-fill!
vec
val)
vec with multiple copies of
val.
(vector-length
vec)
vec.
(vector-ref
vec
n)
nth element of
vec. Note that elements are numbered
starting at 0.
(vector-set!
vec
k
val)
kth element of
vec to val.
(Note that vectors use 0-based indexing.)
(write
value)
(write
value
output-port)
(write-char
ch)
(write-char
ch
output-port)