From 7c22d439ecafdb15decb075c5c6c5d50d0027a40 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 19 May 2014 20:15:05 -0400 Subject: [PATCH] gestalt-intersect is probably not useful as an API (original commit adapted to naive-routing setting) --- minimart/core.rkt | 6 +++--- minimart/examples/example-lang.rkt | 2 +- minimart/examples/example-plain.rkt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/minimart/core.rkt b/minimart/core.rkt index 8f004f4..28e4599 100644 --- a/minimart/core.rkt +++ b/minimart/core.rkt @@ -20,7 +20,7 @@ gestalt-empty gestalt-empty? gestalt-union - gestalt-intersect + gestalt-filter pretty-print-matcher pretty-print-gestalt spawn @@ -82,7 +82,7 @@ (flatten g))) (define (gestalt-union . gs) (flatten gs)) -(define (gestalt-intersect g1 g2) (intersect-routes (flatten g1) (flatten g2))) +(define (gestalt-filter g1 g2) (intersect-routes (flatten g1) (flatten g2))) (define (gestalt-empty) '()) (define (gestalt-empty? g) (null? g)) @@ -311,4 +311,4 @@ [(message body meta-level feedback?) (enqueue-event (message body (+ meta-level 1) feedback?) w)])) -(define routing-implementation 'naive) \ No newline at end of file +(define routing-implementation 'naive) diff --git a/minimart/examples/example-lang.rkt b/minimart/examples/example-lang.rkt index ec77f43..38dd799 100644 --- a/minimart/examples/example-lang.rkt +++ b/minimart/examples/example-lang.rkt @@ -34,7 +34,7 @@ (printf "REF:") (pretty-print-matcher (gestalt-ref g 0 0 #f) #:indent 4) (printf "INTERSECTED:\n") - (pretty-print-gestalt (gestalt-intersect g (sub (set-timer ? ? ?)))) + (pretty-print-gestalt (gestalt-filter g (pub (set-timer ? ? ?) #:level 1))) #f] [(message (timer-expired 'tick now) _ _) (printf "TICK ~v\n" now) diff --git a/minimart/examples/example-plain.rkt b/minimart/examples/example-plain.rkt index ff76989..7a38ff3 100644 --- a/minimart/examples/example-plain.rkt +++ b/minimart/examples/example-plain.rkt @@ -30,7 +30,7 @@ (printf "REF:") (pretty-print-matcher (gestalt-ref g 0 0 #f) #:indent 4) (printf "INTERSECTED:\n") - (pretty-print-gestalt (gestalt-intersect g (sub (set-timer ? ? ?)))) + (pretty-print-gestalt (gestalt-filter g (pub (set-timer ? ? ?) #:level 1))) #f] [(message (timer-expired 'tick now) _ _) (printf "TICK ~v\n" now)