From 211171dec8366a5c3fe5beed931f1a7ea182b3ba Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 20 Nov 2014 17:19:01 -0800 Subject: [PATCH] fix ->list for integers; add coerce/list contract --- coerce.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coerce.rkt b/coerce.rkt index 5649cae..4177fa8 100644 --- a/coerce.rkt +++ b/coerce.rkt @@ -80,6 +80,7 @@ [(set? x) (set->list x)] ;; location relevant because hash or dict are also sequences [(dict? x) (dict->list x)] + [(integer? x) (list x)] ; because an integer tests #t for sequence? [(sequence? x) (sequence->list x)] [(stream? x) (stream->list x)] [else (list x)])))) @@ -151,4 +152,5 @@ (define+provide-coercion-contract symbol) (define+provide-coercion-contract path) (define+provide-coercion-contract boolean) +(define+provide-coercion-contract list)