I am trying to create a map from an interleaved list and running into errors. Here is what I am doing:
(interleave ['a 'b] [1 2])
gives the list (a 1 b 2).
If I want to create a hash-map from a bunch of elements, I can do
(hash-map 'a 1 'b 2)
Combining the two together,
(hash-map ~@(interleave ['a 'b] [1 2]))
I get this error:
java.lang.IllegalStateException: Var clojure.core/unquote-splicing is unbound. (repl-1:2)
How do I pass the elements of the list to hash-map?