This exception tip is a bit confusing.
(assoc [] :a 3)
>
>
> IllegalArgumentException Key must be integer
> clojure.lang.APersistentVector.assoc (APersistentVector.java:347)
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gro
Just a reminder! We would love to see your proposals on language features,
tools, libs, experience reports, ideas, and fun projects for Clojure/conj,
Nov 29-Dec 1 in Durham, NC.
- Call for presentations until Aug 31 -
http://2018.clojure-conj.org/call-for-proposals/
- Opportunity grant
Vector keys must be integers. Try
(assoc [] 0 :a)
A vector has keys from 0 to (count vector) pointing to elements at the same
index. It's more like an Array list in this way.
What you're doing would need a map instead. Try
(assoc {} :a 0)
--
You received this message because you are subscrib