Remove unnecessary keyword from generics examples

This commit is contained in:
Asumu Takikawa 2014-01-19 11:18:05 -05:00
parent 54e24e42c6
commit 018e950634
3 changed files with 6 additions and 9 deletions

View File

@ -143,9 +143,8 @@ be used to implement any of the methods documented as
(define (dict-remove dict key)
(define al (alist-v dict))
(alist (remove* (filter (λ (p) (equal? (car p) key)) al) al)))
(define (dict-count dict #:default [x #f])
(or x
(length (remove-duplicates (alist-v dict) #:key car))))]) (code:comment "etc. other methods")
(define (dict-count dict)
(length (remove-duplicates (alist-v dict) #:key car)))]) (code:comment "etc. other methods")
(define d1 (alist '((1 . a) (2 . b))))
(dict? d1)

View File

@ -13,9 +13,8 @@
(define (dict-remove dict key)
(define al (alist-v dict))
(remove* (assoc key al) al))
(define (dict-count dict #:default [x #f])
(or x
(length (remove-duplicates (alist-v dict) #:key car))))])
(define (dict-count dict)
(length (remove-duplicates (alist-v dict) #:key car)))])
(module+ test

View File

@ -13,9 +13,8 @@
(define (dict-remove dict key)
(define al (alist-v dict))
(remove* (assoc key al) al))
(define (dict-count dict #:default [x #f])
(or x
(length (remove-duplicates (alist-v dict) #:key car))))])
(define (dict-count dict)
(length (remove-duplicates (alist-v dict) #:key car)))])
(module+ test