Add "annotations" procedure
This commit is contained in:
parent
669d1b480d
commit
4ed8fd2c92
|
@ -2,6 +2,7 @@
|
|||
|
||||
(provide (struct-out annotated)
|
||||
annotate
|
||||
annotations
|
||||
strip-annotations
|
||||
strip-annotations-proc
|
||||
peel-annotations
|
||||
|
@ -37,6 +38,11 @@
|
|||
[item
|
||||
(annotated as #f item)]))
|
||||
|
||||
(define (annotations v)
|
||||
(match v
|
||||
[(annotated annotations _ _) annotations]
|
||||
[_ '()]))
|
||||
|
||||
(define (strip-annotations-proc v #:depth [depth +inf.0])
|
||||
(let walk* ((v v) (depth depth))
|
||||
(define next-depth (- depth 1))
|
||||
|
|
Loading…
Reference in New Issue