Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何获得以下地图的数量?
[{:a "a"} {:b "b"}]
我期待着2。
2
只需使用count:
count
(def data [{:a "a"} {:b "b"}] ) (count data) => 2
您可能还对这些网站感兴趣:
创建一个df(定义)并将变量分配给(原子0)并在doseq内计数。
例如 (df count-var (atom 0)) (doseq [n vec-of-maps]
(交换!cnt-var + 1))