In Clojure is there an easy way to convert between list types?

后端 未结 6 652
广开言路
广开言路 2020-12-07 13:28

I am often finding myself using a lazy list when I want a vector, and vice versa. Also, sometimes I have a vector of maps, when I really wanted a set of maps. Are there any

6条回答
  •  没有蜡笔的小新
    2020-12-07 13:49

    vec, set and generally into are your friends to easily "convert" to another collection type.

    How do you want to transform a vector of maps into a map of maps? You need a key, can you provide use with sample input/expected output?

提交回复
热议问题