make set-union with 0 args return an empty set

This commit is contained in:
Jon Rafkind 2010-11-28 23:07:51 -07:00
parent eabbb7dff2
commit 46244f81fc
2 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,7 @@
(define set-union
(case-lambda
[() (set)]
[(set)
(unless (set? set) (raise-type-error 'set-union "set" 0 set))
set]

View File

@ -17,6 +17,8 @@
(test #t set-empty? (seteqv))
(test #t set? (seteqv 1 2 3))
(test #f set-empty? (seteqv 1 2 3))
(test #t set? (set-union))
(test #t set-empty? (set-union))
(test #f set-eq? (set 1 2 3))
(test #f set-eqv? (set 1 2 3))