diff --git a/minimart/gestalt.rkt b/minimart/gestalt.rkt index 2497fd6..c3ee691 100644 --- a/minimart/gestalt.rkt +++ b/minimart/gestalt.rkt @@ -25,6 +25,7 @@ simple-gestalt gestalt-empty gestalt-empty? + gestalt-union* gestalt-union gestalt-filter gestalt-match @@ -263,9 +264,9 @@ (cons (matcher-combiner (car sa1) (car sa2)) (matcher-combiner (cdr sa1) (cdr sa2)))))) -;; Gestalt* -> Gestalt -;; Computes the union of its arguments. -(define (gestalt-union . gs) +;; (Listof Gestalt) -> Gestalt +;; Computes the union of the given gestalts. +(define (gestalt-union* gs) (if (null? gs) (gestalt-empty) (let walk ((gs gs)) @@ -273,6 +274,11 @@ [(list g) g] [(cons g rest) (gestalt-union1 g (walk rest))])))) +;; Gestalt* -> Gestalt +;; Computes the union of its arguments. +(define (gestalt-union . gs) + (gestalt-union* gs)) + ;; Gestalt Gestalt -> Gestalt ;; Computes the union of its arguments. (define (gestalt-union1 g1 g2) (gestalt-combine-straight g1 g2 (lambda (side x) x) matcher-union))