【发布时间】:2018-01-11 22:33:44
【问题描述】:
我尝试使用 Clojure,但坚持使用嵌套的 hashmap。 我有这样的结构:
{:type "view"
children: [
{:type "view"
:id "123"}
{:type "view"
:children [
{:type "view"}]}]}
现在我想将字段:id 添加到每个带有随机字符串的哈希图(如果不存在)。要得到这样的东西:
{:type "view"
:id "43434"
children: [
{:type "view"
:id "123"}
{:type "view"
:id "456"
:children [
{:type "view"
:id "5656"}]}]}
【问题讨论】:
标签: recursion clojure hashmap clojurescript