From 52728869c6140df52edafec61eb88bb42784be58 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 11 Jan 2017 18:46:46 -0800 Subject: [PATCH] be more tolerant with input types --- txexpr/base.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/txexpr/base.rkt b/txexpr/base.rkt index ca9357b..6f76b61 100644 --- a/txexpr/base.rkt +++ b/txexpr/base.rkt @@ -211,12 +211,12 @@ ;; helpers. we are getting a string or symbol (define+provide+safe (->txexpr-attr-key x) (can-be-txexpr-attr-key? . -> . txexpr-attr-key?) - (if (string? x) (string->symbol x) x)) + (->symbol x)) (define+provide+safe (->txexpr-attr-value x) (can-be-txexpr-attr-value? . -> . txexpr-attr-value?) - (if (symbol? x) (symbol->string x) x)) + (->string x)) (define identity (λ (x) x))