From 4a40ff3d7e9cbfbfa319758d8bf24ab6c19e8cd7 Mon Sep 17 00:00:00 2001 From: Kodi Arfer Date: Fri, 2 Aug 2019 17:06:26 -0400 Subject: [PATCH] Check for HySequence in hy.contrib.walk --- hy/contrib/walk.hy | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hy/contrib/walk.hy b/hy/contrib/walk.hy index 40f0c62..def9049 100644 --- a/hy/contrib/walk.hy +++ b/hy/contrib/walk.hy @@ -4,6 +4,7 @@ ;; license. See the LICENSE. (import [hy [HyExpression HyDict]] + [hy.models [HySequence]] [functools [partial]] [importlib [import-module]] [collections [OrderedDict]] @@ -17,9 +18,7 @@ (cond [(instance? HyExpression form) (outer (HyExpression (map inner form)))] - [(instance? HyDict form) - (HyDict (outer (HyExpression (map inner form))))] - [(list? form) + [(or (instance? HySequence form) (list? form)) ((type form) (outer (HyExpression (map inner form))))] [(coll? form) (walk inner outer (list form))]