Check for HySequence in hy.contrib.walk
This commit is contained in:
parent
95ad5a01c8
commit
4a40ff3d7e
@ -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))]
|
||||
|
Loading…
Reference in New Issue
Block a user