Next: Procedure Names
Up: Procedures
Previous: Arity
A primitive procedure is a procedure that is built into
MzScheme, although not all built-in procedures (see
section 9.3.1) are primitives. Almost all R4RS procedures
are primitives, as are most of the procedures described in this
manual (except for MzLib procedures).
- (primitive? v)
returns #t if v is a primitive procedure or
#f otherwise.
- (primitive-name prim)
returns the name of the primitive procedure prim as a string.
- (primitive-result-arity prim)
returns the arity of the result of the primitive procedure prim
(as opposed to the procedure's input arity as returned by
arity; see section 4.10.1). For most primitives, this procedure
returns 1 since most primitives return a single value when
applied. For information about arity values, see section 4.10.1.
- (primitive-closure? v)
returns #t if v is internally implemented as a primitive
closure rather than an simple primitive procedure, #f otherwise.
This information is intended for use by the MzScheme compiler.
- (simple-return-primitive? prim)
returns #t if the given primitive procedure never computes its
return value by an internal chained tail call. This information is
intended for use by the MzScheme compiler.
PLT