assoc can throw an IndexOutOfBoundsException when the index is, well, out of bounds, as in:
user=> (assoc [] 1 nil) IndexOutOfBoundsException clojure.lang.PersistentVector.assocN(PersistentVector.java:137)
Why not throw the same exception if I try to set the value at index 0?
user=> (assoc [] 0 nil) [nil]
It seems to me that in both cases the index goes beyond ...
thanks
source share