update check-duplicates with #:default kw arg
This commit is contained in:
parent
9fe2252eef
commit
4a869d97d1
|
@ -3323,10 +3323,22 @@
|
|||
(->key (-lst a) (-> b b -Boolean) #:key (-> a b) #f #:cache-keys? -Boolean #f (-lst a)))))
|
||||
(check-duplicates
|
||||
(-poly
|
||||
(a b)
|
||||
(a b c)
|
||||
(cl->*
|
||||
(->optkey (-lst a) ((-> a a Univ)) #:key (-> a a) #f (-opt a))
|
||||
(->optkey (-lst a) ((-> b b Univ)) #:key (-> a b) #f (-opt a)))))
|
||||
(->optkey (-lst a) ((-> a a Univ))
|
||||
#:key (-> a a) #f
|
||||
(-opt a))
|
||||
(->optkey (-lst a) ((-> b b Univ))
|
||||
#:key (-> a b) #f
|
||||
(-opt a))
|
||||
(->optkey (-lst a) ((-> a a Univ))
|
||||
#:key (-> a a) #f
|
||||
#:default (-> c) #f
|
||||
(Un a c))
|
||||
(->optkey (-lst a) ((-> b b Univ))
|
||||
#:key (-> a b) #f
|
||||
#:default (-> c) #f
|
||||
(Un a c)))))
|
||||
(remove-duplicates
|
||||
(-poly
|
||||
(a b)
|
||||
|
|
|
@ -1439,6 +1439,22 @@
|
|||
[tc-e (remf symbol? '(a b c)) (-lst (one-of/c 'a 'b 'c))]
|
||||
[tc-e (remf* symbol? '(a b c)) (-lst (one-of/c 'a 'b 'c))]
|
||||
[tc-e (check-duplicates '("a" "a" "b")) (-opt -String)]
|
||||
[tc-e (check-duplicates '("a" "a" "b") string=?) (-opt -String)]
|
||||
;[tc-e ((inst check-duplicates String Number)
|
||||
; '("a" "aa" "aaa")
|
||||
; #:key string-length)
|
||||
; (-opt -String)]
|
||||
[tc-e ((inst check-duplicates String Any 'nope)
|
||||
'("a" "a" "b")
|
||||
string=?
|
||||
#:default (λ () 'nope))
|
||||
(Un (-val 'nope) -String)]
|
||||
[tc-e ((inst check-duplicates String Number 'nope)
|
||||
'("Hello" "world")
|
||||
=
|
||||
#:key string-length
|
||||
#:default (λ () 'nope))
|
||||
(Un -String (-val 'nope))]
|
||||
|
||||
;;Path tests
|
||||
(tc-e (path-string? "foo") -Boolean)
|
||||
|
|
Loading…
Reference in New Issue
Block a user