From 310cba99036f7cc9caf6db76fa3b8868db139ce3 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 16 Feb 2014 22:12:00 -0800 Subject: [PATCH] updates --- main.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.rkt b/main.rkt index edfcac0..eebc6f2 100644 --- a/main.rkt +++ b/main.rkt @@ -1,6 +1,6 @@ #lang racket/base (require racket/contract racket/match xml racket/list) -(require sugar) +(require sugar/define sugar/coerce) ;; a tagged-xexpr consists of a tag, optional attributes, and then elements. @@ -58,7 +58,7 @@ ;; use flatten to splice xexpr-attrs into list ;; use hash to ensure keys are unique (later values will overwrite earlier) (define attr-hash (apply hash (make-attr-list (flatten items)))) - `(,@(map (λ(k) (list k (get attr-hash k))) + `(,@(map (λ(k) (list k (hash-ref attr-hash k))) ;; sort needed for predictable results for unit tests (sort (hash-keys attr-hash) (λ(a b) (stringstring a) (->string b)))))))