scsh-0.5/alt/annotate.scm

14 lines
320 B
Scheme
Raw Normal View History

1995-10-13 23:34:21 -04:00
; no copyright please, silly shell script
(define *annotations* '()
(define (annotate-procedure proc ann)
(let ((new (lambda args (apply proc args))))
(set! *annotations* (cons (cons new ann) *annotations*))
new))
(define (procedure-annotation proc)
(cond ((assq proc *annotations*) => cdr)
(else #f)))