Hello!
I am having a small issue with a hash-map initialization and I am failing
to understand why. I have the following situation:
(def a-list '({:BAR_KEY bar-value}, {:BAR_KEY another-value}))
(defn my-function [foo-id a-keyword a-list]
(map #({:foo_id foo-id (keyword a-keyword) (:BAR_KEY %)}) a-list))
>
So, by running the above function like this:
(my-function 5 "my_keyword" a-list)
I get the following error:
*clojure.lang.ArityException: Wrong number of args (0) passed to:
> PersistentArrayMap*
I am trying to get the following result:
({:foo_id 5 :my_keyword bar-value}, {:foo_id 5 :my_keyword another-value})
Any ideas? I have played around in repl for the last 2 hrs but I haven't
found the proper way to do this.
Thank you for your time :)
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.