picrin/contrib/10.attribute/attr.scm

14 lines
293 B
Scheme
Raw Normal View History

2016-02-03 07:49:55 -05:00
(define-library (picrin base)
(define attribute-table (make-register))
(define (attribute obj)
(let ((r (attribute-table obj)))
(if r
(cdr r)
(let ((dict (make-dictionary)))
(attribute-table obj dict)
dict))))
(export attribute))