This library defines a number of procedures and syntactic forms that are commonly provided by other Scheme implementations. Most of the procedures are aliases for built-in MzScheme procedures, as shown in the table below. The remaining procedures and forms are described below.
|
Same as (.not (pair? v))
( SYNTAX
define-structure (name-identifier field-identifier ···))
Like define-struct, except that the name-identifier is
moved inside the parenthesis for fields. A second form of
define-structure, below, supports initial-value expressions
for fields.
( SYNTAX
define-structure (name-identifier field-identifier ···) ((init-field-identifier init-expr) ···))
Like define-struct, except that the name-identifier is
moved inside the parenthesis for fields, and additional fields can be
specified with initial-value expressions.
The init-field-identifiers do not have corresponding arguments
for the make- constructor. Instead, the
name-identifierinit-field-identifier's init-expr is evaluated to obtain
the field's value when the constructor is called. The
field-identifiers are bound in init-exprs, but not the
init-field-identifiers.
Example:
(define-structure (add left right) ([sum (+ left right)]))
(add-sum (make-add 3 6)) ; => 9
(getprop sym property default) PROCEDURE
Gets a property value associated with the symbol sym.
The property argument is also a symbol that names the
property to be found. If the property is not found, default
is returned. If the default argument is omitted, #f
is used as the default.
(new-cafe [eval-handler]) PROCEDURE
Emulates Chez Scheme's new-cafe.
(putprop sym property value) PROCEDURE
Installs a value for property of the symbol sym.
See getprop above.
(sort less-than?-proc list) PROCEDURE
This is the same as mergesort (see section 21) with
the arguments reversed.