From 05af5c0e21c3dc32d1853ab288f125eb3c8dff82 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 28 Oct 2018 15:16:48 -0700 Subject: [PATCH] patch `disjoin` --- txexpr/base.rkt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/txexpr/base.rkt b/txexpr/base.rkt index 9fb3586..0b8d45d 100644 --- a/txexpr/base.rkt +++ b/txexpr/base.rkt @@ -1,8 +1,12 @@ #lang racket/base -(require racket/match racket/function racket/format sugar/define sugar/list sugar/coerce racket/string racket/list xml) +(require racket/match sugar/define sugar/list sugar/coerce racket/string racket/list xml) (provide cdata? cdata valid-char? xexpr->string xexpr?) ; from xml (provide empty) ; from racket/list +(define ((disjoin . funcs) x) + (for/or ([func (in-list funcs)]) + (func x))) + ;; Section 2.2 of XML 1.1 ;; (XML 1.0 is slightly different and more restrictive) ;; make private version of my-valid-char to get consistent results with Racket 6.0