From c01d4f09bda876f36f08fcf506946f94c26ca3f0 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 14 May 2014 00:02:23 -0400 Subject: [PATCH] gestalt-empty? --- minimart/gestalt.rkt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/minimart/gestalt.rkt b/minimart/gestalt.rkt index e32d439..ccf1dd0 100644 --- a/minimart/gestalt.rkt +++ b/minimart/gestalt.rkt @@ -15,6 +15,7 @@ lift-gestalt simple-gestalt gestalt-empty + gestalt-empty? gestalt-combine gestalt-combine-straight gestalt-combine-crossed @@ -90,6 +91,10 @@ (define (gestalt-empty) (gestalt '())) +(define (gestalt-empty? g) + (andmap (lambda (ls) (andmap (lambda (l) (and (matcher-empty? (car l)) (matcher-empty? (cdr l)))) ls)) + (gestalt-metalevels g))) + (define (map-zip imbalance-handler item-handler ls1 ls2) (let walk ((ls1 ls1) (ls2 ls2)) (match* (ls1 ls2)