Changeset 34261 in project


Ignore:
Timestamp:
08/06/17 17:40:21 (4 months ago)
Author:
sjamaan
Message:

man/5: Add Module (chicken plist)

Location:
wiki/man/5
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/5/Included modules

    r34255 r34261  
    3333* [[Module (chicken pathname)]] : Manipulating path names
    3434* [[Module (chicken platform)]] : Information about the platform your code is running on
     35* [[Module (chicken plist)]] : Symbol property lists
    3536* [[Module (chicken port)]] : Manipulating port objects
    3637* [[Module (chicken pretty-print)]] : Pretty-printing s-expressions
  • wiki/man/5/Module (chicken platform)

    r34052 r34261  
    186186Previous: [[Module (chicken pathname)]]
    187187
    188 Next: [[Module (chicken port)]]
     188Next: [[Module (chicken plist)]]
  • wiki/man/5/Module (chicken port)

    r34235 r34261  
    221221
    222222---
    223 Previous: [[Module (chicken platform)]]
     223Previous: [[Module (chicken plist)]]
    224224
    225225Next: [[Module (chicken pretty-print)]]
  • wiki/man/5/TODO/Unit library

    r34254 r34261  
    425425
    426426Returns a newly created, unique symbol with the name {{STRING}}.
    427 
    428 
    429 ==== Property lists
    430 
    431 As in other Lisp dialects, CHICKEN supports "property lists" associated with symbols.
    432 Properties are accessible via a key that can be any kind of value but which will
    433 be compared using {{eq?}}.
    434 
    435 ===== get
    436 
    437 <procedure>(get SYMBOL PROPERTY [DEFAULT])</procedure>
    438 
    439 Returns the value stored under the key {{PROPERTY}} in the property
    440 list of {{SYMBOL}}. If no such property is stored, returns
    441 {{DEFAULT}}. The {{DEFAULT}} is optional and defaults to {{#f}}.
    442 
    443 ===== put!
    444 
    445 <procedure>(put! SYMBOL PROPERTY VALUE)</procedure>
    446 setter: (set! (get SYMBOL PROPERTY) VALUE)
    447 
    448 Stores {{VALUE}} under the key {{PROPERTY}} in the property list of
    449 {{SYMBOL}} replacing any previously stored value.
    450 
    451 ===== remprop!
    452 
    453 <procedure>(remprop! SYMBOL PROPERTY)</procedure>
    454 
    455 Deletes the first property matching the key {{PROPERTY}} in the property list
    456 of {{SYMBOL}}. Returns {{#t}} when a deletion performed, and {{#f}} otherwise.
    457 
    458 ===== symbol-plist
    459 
    460 <procedure>(symbol-plist SYMBOL)</procedure>
    461 setter: (set! (symbol-plist SYMBOL) LST)
    462 
    463 Returns the property list of {{SYMBOL}} or sets it.
    464 
    465 ===== get-properties
    466 
    467 <procedure>(get-properties SYMBOL PROPERTIES)</procedure>
    468 
    469 Searches the property list of {{SYMBOL}} for the first property with a key in
    470 the list {{PROPERTIES}}. Returns 3 values: the matching property key, value,
    471 and the tail of property list after the matching property. When no match found
    472 all values are {{#f}}.
    473 
    474 {{PROPERTIES}} may also be an atom, in which case it is treated as a list of
    475 one element.
    476427
    477428
  • wiki/man/5/TODO/new-manual.org

    r34255 r34261  
    3434** Module (chicken pathname) : Manipulating path names
    3535** Module (chicken platform) : Information about the platform your code is running on
     36** Module (chicken plist) : Symbol property lists
    3637** Module (chicken port) : Manipulating port objects
    3738** Module (chicken pretty-print) : Pretty-printing s-expressions
Note: See TracChangeset for help on using the changeset viewer.