## Module (chicken plist)

As in other Lisp dialects, CHICKEN supports "property lists" associated with symbols. Properties are accessible via a key that can be any kind of value but which will be compared using `eq?`.

### get

get SYMBOL PROPERTY #!optional DEFAULT procedure

  Returns the value stored under the key PROPERTY in the property list of SYMBOL. If no such property is stored, returns DEFAULT. The DEFAULT is optional and defaults to `#f`.

### put!

put! SYMBOL PROPERTY VALUE procedure
`(set! (get SYMBOL PROPERTY) VALUE)`procedure

  Stores VALUE under the key PROPERTY in the property list of SYMBOL replacing any previously stored value.

### remprop!

remprop! SYMBOL PROPERTY procedure

  Deletes the first property matching the key PROPERTY in the property list of SYMBOL. Returns `#t` when a deletion performed, and `#f` otherwise.

### symbol-plist

symbol-plist SYMBOL procedure
set! (symbol-plist SYMBOL) LST procedure

  Returns the property list of SYMBOL or sets it. The property list is a flat list of alternating properties and values.

  This list is not guaranteed to be a fresh copy, so avoid mutating it directly.

### get-properties

get-properties SYMBOL PROPERTIES procedure

  Searches the property list of SYMBOL for the first property with a key in the list PROPERTIES. Returns 3 values: the matching property key, value, and the tail of property list after the matching property. When no match found all values are `#f`.

  This tail of the property list is not guaranteed to be a fresh copy, so avoid mutating it directly.

  PROPERTIES may also be an atom, in which case it is treated as a list of one element.

Previous: Module (chicken platform)

Next: Module (chicken port)