将嵌套地图展平为行

时间:2017-09-03 14:21:31

标签: clojure nested-map

在clojure中,我怎样才能像这样转换嵌套地图:

{"1" {"1.1" {}
      "1.2" {}}
 "2" {"2.1" {}
      "2.2" {}
      "2.3" {}}}

进入这个:

[["1" "1.1"]
 ["1" "1.2"]
 ["2" "2.1"]
 ["2" "2.2"]
 ["2" "2.3"]]

如果嵌套不受限制

0 个答案:

没有答案