combinators: Fix definition for disjoin
parent
bfefb07673
commit
687357bb42
|
@ -41,10 +41,9 @@ if these arguments satisfy every other predicate in PREDICATES."
|
||||||
"Returns a procedure that is the disjunction of every predicate in PREDICATES.
|
"Returns a procedure that is the disjunction of every predicate in PREDICATES.
|
||||||
The returned procedure takes an arbitrary number of arguments, and returns #t if
|
The returned procedure takes an arbitrary number of arguments, and returns #t if
|
||||||
these arguments satisfy exactly one predicate in PREDICATES, and #f otherwise."
|
these arguments satisfy exactly one predicate in PREDICATES, and #f otherwise."
|
||||||
(lambda args
|
|
||||||
(match (filter (partial (flip apply) args) predicates)
|
(match (filter (partial (flip apply) args) predicates)
|
||||||
((_) #t)
|
((_) #t)
|
||||||
(else #f))))
|
(else #f)))
|
||||||
|
|
||||||
(define* ((inclusive-disjoin . predicates) . args)
|
(define* ((inclusive-disjoin . predicates) . args)
|
||||||
"Returns a procedure that is the inclusive disjunction of every predicate in
|
"Returns a procedure that is the inclusive disjunction of every predicate in
|
||||||
|
|
Loading…
Reference in New Issue