From 00e9fabdb8cbe2b31096df0b018cb175f57ea44a Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 24 Jan 2016 11:44:54 -0800 Subject: [PATCH] asciify error msgs --- container.rkt | 2 +- list.rkt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/container.rkt b/container.rkt index 11f3ef2..7704eff 100644 --- a/container.rkt +++ b/container.rkt @@ -13,7 +13,7 @@ (define result ;; use handler to capture error & print localized error message - (with-handlers ([exn:fail? (λ(exn) (error (format "get: couldn’t retrieve ~a from ~a" (if end (format "items ~a through ~a" start end) (format "item ~a" start)) container)))]) + (with-handlers ([exn:fail? (λ(exn) (error (format "get: couldn't retrieve ~a from ~a" (if end (format "items ~a through ~a" start end) (format "item ~a" start)) container)))]) (let ([end (if (and (equal? end #f) (sliceable-container? container)) (add1 start) end)]) (cond [(list? container) (for/list ([i (in-range start end)]) (list-ref container i))] diff --git a/list.rkt b/list.rkt index 1e59b48..46afbf9 100644 --- a/list.rkt +++ b/list.rkt @@ -118,8 +118,8 @@ (let* ([duplicate-keys (filter-not empty? (hash-map (frequency-hash (->list x)) (λ(element freq) (if (> freq 1) element '()))))]) (error (string-append "members-unique? failed because " (if (= (len duplicate-keys) 1) - "item isn’t" - "items aren’t") " unique:") duplicate-keys)) + "item isn't" + "items aren't") " unique:") duplicate-keys)) result))