Next: Symbol Read Syntax, Previous: Symbol Primitives, Up: Symbols
In traditional Lisp dialects, symbols are often understood as having three kinds of value at once:
put or get functions.
Although Scheme (as one of its simplifications with respect to Lisp) does away with the distinction between variable and function namespaces, Guile currently retains some elements of the traditional structure in case they turn out to be useful when implementing translators for other languages, in particular Emacs Lisp.
Specifically, Guile symbols have two extra slots. for a symbol's property list, and for its “function value.” The following procedures are provided to access these slots.
Return the contents of symbol's function slot.
Change the binding of symbol's function slot to value.
Return the property list currently associated with symbol.
Change the binding of symbol's property slot to value.
From sym's property list, return the value for property prop. The assumption is that sym's property list is an association list whose keys are distinguished from each other using
equal?; prop should be one of the keys in that list. If the property list has no entry for prop,symbol-propertyreturns#f.