标签: clojure casting type-conversion
给出以下向量:["a" "b" "c"]如何将其转换为[:a :b :c]
["a" "b" "c"]
[:a :b :c]
答案 0 :(得分:5)
您可以使用mapv:
mapv
(mapv keyword ["a" "b" "c"])
答案 1 :(得分:0)
(vec (map keyword ["a" "b" "c"]))