gestalt-union*
This commit is contained in:
parent
244e793d03
commit
feaffaa752
|
@ -25,6 +25,7 @@
|
||||||
simple-gestalt
|
simple-gestalt
|
||||||
gestalt-empty
|
gestalt-empty
|
||||||
gestalt-empty?
|
gestalt-empty?
|
||||||
|
gestalt-union*
|
||||||
gestalt-union
|
gestalt-union
|
||||||
gestalt-filter
|
gestalt-filter
|
||||||
gestalt-match
|
gestalt-match
|
||||||
|
@ -263,9 +264,9 @@
|
||||||
(cons (matcher-combiner (car sa1) (car sa2))
|
(cons (matcher-combiner (car sa1) (car sa2))
|
||||||
(matcher-combiner (cdr sa1) (cdr sa2))))))
|
(matcher-combiner (cdr sa1) (cdr sa2))))))
|
||||||
|
|
||||||
;; Gestalt* -> Gestalt
|
;; (Listof Gestalt) -> Gestalt
|
||||||
;; Computes the union of its arguments.
|
;; Computes the union of the given gestalts.
|
||||||
(define (gestalt-union . gs)
|
(define (gestalt-union* gs)
|
||||||
(if (null? gs)
|
(if (null? gs)
|
||||||
(gestalt-empty)
|
(gestalt-empty)
|
||||||
(let walk ((gs gs))
|
(let walk ((gs gs))
|
||||||
|
@ -273,6 +274,11 @@
|
||||||
[(list g) g]
|
[(list g) g]
|
||||||
[(cons g rest) (gestalt-union1 g (walk rest))]))))
|
[(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
|
;; Gestalt Gestalt -> Gestalt
|
||||||
;; Computes the union of its arguments.
|
;; Computes the union of its arguments.
|
||||||
(define (gestalt-union1 g1 g2) (gestalt-combine-straight g1 g2 (lambda (side x) x) matcher-union))
|
(define (gestalt-union1 g1 g2) (gestalt-combine-straight g1 g2 (lambda (side x) x) matcher-union))
|
||||||
|
|
Loading…
Reference in New Issue