Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.
Next: Procedures with Setters, Previous: Higher-Order Functions, Up: Procedures [Contents][Index]
In addition to the information that is strictly necessary to run, procedures may have other associated information. For example, the name of a procedure is information not for the procedure, but about the procedure. This meta-information can be accessed via the procedure properties interface.
The first group of procedures in this meta-interface are predicates to
test whether a Scheme object is a procedure, or a special procedure,
respectively. procedure?
is the most general predicates, it
returns #t
for any kind of procedure.
Return #t
if obj is a procedure.
Return #t
if obj is a thunk—a procedure that does
not accept arguments.
Procedure properties are general properties associated with procedures. These can be the name of a procedure or other relevant information, such as debug hints.
Return the name of the procedure proc
Return the source of the procedure proc. Returns #f
if
the source code is not available.
Return the properties associated with proc, as an association list.
Return the property of proc with name key.
Set proc’s property list to alist.
In proc’s property list, set the property named key to value.
Documentation for a procedure can be accessed with the procedure
procedure-documentation
.
Return the documentation string associated with proc
. By
convention, if a procedure contains more than one expression and the
first expression is a string constant, that string is assumed to contain
documentation for that procedure.
Next: Procedures with Setters, Previous: Higher-Order Functions, Up: Procedures [Contents][Index]