* module/srfi/srfi-14.mes (list->char-set): New function.
* tests/srfi-14.test ("list->char-set!"): Test it.
(define char-set:whitespace (char-set #\tab #\return #\vtab #\newline #\space))
+(define (list->char-set lst)
+ (apply char-set lst))
+
(define (string->char-set x . base)
(apply char-set (append (string->list x) (if (null? base) '() (cdar base)))))
(pass-if "char-set-contains?"
(char-set-contains? char-set:whitespace #\space))
+(pass-if "list->char-set!"
+ (char-set= (char-set #\a #\b #\c) (list->char-set '(#\a #\b #\c))))
+
(pass-if "string->char-set!"
(char-set= (char-set #\a #\b #\c #\d) (string->char-set! "d" (string->char-set "abc"))))