From a3b407e59c0089da2ab991032da622664c94cba7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 28 Oct 2018 15:44:04 -0700 Subject: [PATCH] stylish --- txexpr/base.rkt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/txexpr/base.rkt b/txexpr/base.rkt index b9c988b..22e43ef 100644 --- a/txexpr/base.rkt +++ b/txexpr/base.rkt @@ -22,8 +22,12 @@ (define+provide+safe (txexpr? x [short-only #f]) predicate/c (match x - [(list (? txexpr-tag?) (? my-xexpr?) ...) #true] - [(list (? txexpr-tag?) (? txexpr-attrs?) (? my-xexpr?) ...) #:when (not short-only) #true] + [(cons (? txexpr-tag?) rest) + (=> resume) + (match rest + [(list (? my-xexpr?) ...) #true] + [(list (? txexpr-attrs?) (? my-xexpr?) ...) #:when (not short-only) #true] + [_ (resume)])] [_ #false])) (define+provide+safe (txexpr-short? x)