From: Chris Hanson Date: Sun, 12 Feb 2017 05:31:04 +0000 (-0800) Subject: Allow conjoin and disjoin to be used with unregistered predicates. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~127 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=505ce39c91cf999a6408ea3c69c56e8a2c076875;p=mit-scheme.git Allow conjoin and disjoin to be used with unregistered predicates. --- diff --git a/src/runtime/compound-predicate.scm b/src/runtime/compound-predicate.scm index 183f8f45f..aad7bd579 100644 --- 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)) (define compound-operator?) (define compound-operator-builder)