From 7cf4c79757677c8ea1a0acc37e97fdf600abf1f4 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 22 Mar 2012 04:48:49 -0400 Subject: [PATCH] Another relation utility --- relation.rkt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/relation.rkt b/relation.rkt index a2417fe..eeb3018 100644 --- a/relation.rkt +++ b/relation.rkt @@ -11,6 +11,7 @@ relation->hash in-relation-domain + in-relation/grouped relation-empty? relation-count @@ -76,6 +77,9 @@ (define (in-relation-domain r) (in-hash-keys (relation-table r))) +(define (in-relation/grouped r) + (in-hash (relation-table r))) + (define (relation-empty? r) (zero? (hash-count (relation-table r))))