I have 2 list let say list of user (list-usr) and (usr-index), i want to create hash-map from these list much like
(def list-usr [196 186 244])
(def idx-usr [0 1 2])
how can i form (hash-map {196 0 186 1 244 2}) from 2 list ?
ByanJati
The function for taking two vectors and interleaving to create hash map is zipmap.
It should provide what you want, keep in mind that you will be using integers as the keys:
(zipmap list-usr idx-usr)
zipmap