# Walk from the API is defined using a case
(defn walk
`Iterate over the values in ast and apply f
to them. Collect the results in a data structure. If ast is not a
table, struct, array, or tuple,
returns form.`
[f form]
(case (type form)
:table (walk-dict f form)
:struct (table/to-struct (walk-dict f form))
:array (walk-ind f form)
:tuple (let [x (walk-ind f form)]
(if (= :parens (tuple/type form))
(tuple/slice x)
(tuple/brackets ;x)))
form))