(require mzlib/compat) | package: compatibility-lib |
The mzlib/compat library defines a number of procedures and syntactic forms that are commonly provided by other Scheme implementations. Most of the procedures are aliases for mzscheme procedures.
procedure
(flush-output-port [o]) → void?
o : output-port? = (current-output-port)
procedure
procedure
(atom? v) → any
v : any/c
syntax
(define-structure (name-id field-id ...))
(define-structure (name-id field-id ...) ((init-field-id init-expr) ...))
The init-field-ids do not have corresponding arguments for the make-name-id constructor. Instead, each init-field-id’s init-expr is evaluated to obtain the field’s value when the constructor is called. The field-ids are bound in init-exprs, but not other init-field-ids.
> (define-structure (add left right) ([sum (+ left right)])) > (add-sum (make-add 3 6)) 9
procedure
(getprop sym property [default]) → any/c
sym : symbol? property : symbol? default : any/c = #f
procedure
sym : symbol? property : symbol? value : any/c
The properties obtained with getprop are the ones installed with putprop.
procedure
(new-cafe [eval-handler]) → any
eval-handler : (any/c . -> . any) = #f