把两个序列合并成一个map,不允许使用zipmap
Write a function which takes a vector of keys and a vector of values and constructs a map from them.
用loop实现很简单
(fn [keys vals]
(loop [map {}
ks (seq keys)
vs (seq vals)]
(if (and ks vs)
(recur (assoc map (first ks) (first vs))
(next ks)
(next vs))
map)))