From 126538d86838525ed0b454e65ee1b01921369794 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 8 Apr 2019 16:15:10 -0700 Subject: [PATCH] printing --- quad/quad/quad.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quad/quad/quad.rkt b/quad/quad/quad.rkt index bf4bc4a7..7335c158 100644 --- a/quad/quad/quad.rkt +++ b/quad/quad/quad.rkt @@ -62,7 +62,9 @@ (string-join (map ~v (flatten (hash->list (quad-attrs q)))) " " #:before-first "(" #:after-last ")") "") - (string-join (map ~v (quad-elems q)) " " #:before-first " ")) p)) + (match (quad-elems q) + [(? pair?) (string-join (map ~v (quad-elems q)) " " #:before-first " ")] + [_ ""])) p)) #:methods gen:equal+hash [(define equal-proc quad=?) (define (hash-proc h recur) (equal-hash-code h))