Next: , Previous: , Up: Procedures   [Contents][Index]


12.3 Primitive Procedures

procedure: make-primitive-procedure name [arity]

Name must be a symbol. Arity must be an exact non-negative integer, -1, #f, or #t; if not supplied it defaults to #f. Returns the primitive procedure called name. May perform further actions depending on arity:

#f

If the primitive procedure is not implemented, signals an error.

#t

If the primitive procedure is not implemented, returns #f.

integer

If the primitive procedure is implemented, signals an error if its arity is not equal to arity. If the primitive procedure is not implemented, returns an unimplemented primitive procedure object that accepts arity arguments. An arity of -1 means it accepts any number of arguments.

procedure: primitive-procedure-name primitive-procedure

Returns the name of primitive-procedure, a symbol.

(primitive-procedure-name car)          ⇒  car
procedure: implemented-primitive-procedure? primitive-procedure

Returns #t if primitive-procedure is implemented; otherwise returns #f. Useful because the code that implements a particular primitive procedure is not necessarily linked into the executable Scheme program.