Implement and document predicates for ldict and lset.
This commit is contained in:
parent
0d649c2fd0
commit
c0cfa0721f
3 changed files with 26 additions and 0 deletions
|
@ -32,6 +32,8 @@
|
|||
|
||||
make-ldict
|
||||
|
||||
ldict?
|
||||
|
||||
ldict-empty?
|
||||
|
||||
ldict-contains?
|
||||
|
@ -76,6 +78,11 @@
|
|||
(loop (ldict-set ld (caar pairs) (cdar pairs))
|
||||
(cdr pairs))))))
|
||||
|
||||
;; Returns true if given value is a ldict
|
||||
(define (ldict? v)
|
||||
(and (pair? v)
|
||||
(eq? (car v) TAG-LDICT)))
|
||||
|
||||
;; Convenience accessors
|
||||
(define ldict-meta cadr)
|
||||
(define ldict-equality? caadr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue