chickadee » anaphora » define-properties

(define-properties name ...)syntax

Abstracting away get and put!. Defines for each name two macros, name and name!, the first being an accessor to the property name, the second the corresponding mutator.

(define-properties color weight)
(color! 'foo 'red)
(color 'foo) ; -> 'red
(weight! 'foo 5)
(weight 'foo) ;-> 5
(color! 'foo 'blue)
(color 'foo) ; -> 'blue
(weight! 'foo 50)
(weight 'foo) ; -> 50