For example, if I had:
(defrecord Item [name cost])
How could I convert ["ball" 10] to {:name "ball", :cost 10}?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Short explain of what’s going on.
(->Item "ball" 10)is one of syntax for creating record from given arguments. It’s the same as(Item. "ball" 10). In your case you have vector of arguments, so we use(apply fn args-vector)to deal with.