From f781d22b0f239a0c95c88e07b80df720bde0ce20 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 4 Dec 2014 13:53:13 -0800 Subject: [PATCH] replace listof contract with predicate --- hyphenate/main.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hyphenate/main.rkt b/hyphenate/main.rkt index 2ff8ef7f..e2d466fc 100644 --- a/hyphenate/main.rkt +++ b/hyphenate/main.rkt @@ -48,6 +48,7 @@ (define (exception-word? x) (if (regexp-match #px"^[\\w-]+$" x) #t #f)) +(define (exception-words? xs) (and (list? xs) (andmap exception-word? xs))) (define (string->hashpair pat) (define boundary-name ".") @@ -176,7 +177,7 @@ #:omit-string [omit-string? (λ(x) #f)] #:omit-txexpr [omit-txexpr? (λ(x) #f)]) ((xexpr?) ((or/c char? string?) - #:exceptions (listof exception-word?) + #:exceptions exception-words? #:min-length (or/c integer? #f) #:omit-word (string? . -> . any/c) #:omit-string (string? . -> . any/c)