projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab527b3
)
Allow conjoin and disjoin to be used with unregistered predicates.
author
Chris Hanson
<org/chris-hanson/cph>
Sun, 12 Feb 2017 05:31:04 +0000
(21:31 -0800)
committer
Chris Hanson
<org/chris-hanson/cph>
Sun, 12 Feb 2017 05:31:04 +0000
(21:31 -0800)
src/runtime/compound-predicate.scm
patch
|
blob
|
history
diff --git
a/src/runtime/compound-predicate.scm
b/src/runtime/compound-predicate.scm
index 183f8f45f6ee29c970395f8dfb66732faff73152..aad7bd579009a18e39582f4adf4f74d7ad2dd34f 100644
(file)
--- a/
src/runtime/compound-predicate.scm
+++ b/
src/runtime/compound-predicate.scm
@@
-134,11
+134,13
@@
USA.
(list car-predicate cdr-predicate)))
(define (make-predicate datum-test operator operands)
- (tag->predicate
- ((compound-operator-builder operator)
- datum-test
- operator
- (map predicate->tag operands))))
+ (if (every predicate? operands)
+ (tag->predicate
+ ((compound-operator-builder operator)
+ datum-test
+ operator
+ (map predicate->tag operands)))
+ datum-test))
\f
(define compound-operator?)
(define compound-operator-builder)