picrin/contrib/10.attribute/attr.scm

14 lines
300 B
Scheme
Raw Normal View History

2016-02-03 07:49:55 -05:00
(define-library (picrin base)
2017-03-31 02:59:22 -04:00
(define attribute-table (make-ephemeron-table))
2016-02-03 07:49:55 -05:00
(define (attribute obj)
(let ((r (attribute-table obj)))
(if r
(cdr r)
(let ((dict (make-dictionary)))
(attribute-table obj dict)
dict))))
(export attribute))